Answer to Question #38630 in C++ for eyouel

Question #38630
write a c++ program which produces a simple multiplication table for integers in the range 1-9
1
Expert's answer
2014-01-26T12:25:48-0500
#include <stdio.h>

int main () {
int answer,k;
for ( k = 1; k < 9; k++ ) {
printf("%d ", k);
}
printf("%d\n", k);

for (int i = 2; i <= 9; i++ ) {
for (int j = 2; j <= 9; j++ ){
answer = j * i;
printf ("%d ", answer);
}
printf ("\n");
}

return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS