lab05

Lab05 Answer (for Lab Project) // prog01.c Multiplication table #include main() {int i, j; for (i=1;i<=9;i++){ for (j=1;j<=9;j++) printf("%3d", i*j ); printf(" "); } return 0; } ********************************************************************************** // prog02.c Upper half of multiplication table #include main() {int i, j; for (i=1;i<=9;i++){ for (j=1;j main() { int i, input, product, sum=0; do { printf("Please input an integer from 1 to 9 (both inclusive): "); scanf("%d",&input); if (input>9) printf("Input is > 9. Please enter again: "); else if (input<1) printf("Input is < 1. Please enter again: "); } while (!(input<10 && input>0)); for (i=1;i<=9;i++) { product = input * i; printf("%d ",product); sum+=product; } printf(" The sum of this row is %d.

Essay Information


Words: 701
Pages: 2.8
Rating: None

All Papers Are For Research And Reference Purposes Only. You must cite our web site as your source.