Hey you guys this is my code for a multiplication table I wouldlike to make. And
ID: 3618374 • Letter: H
Question
Hey you guys this is my code for a multiplication table I wouldlike to make. And when the user enters 0 I would like it to displaythe following image: X | 0 ---|--- 0 | 0 or when its 3: X | 0 1 2 3 ---|------------ 0 | 0 0 0 0 1 | 0 1 2 3 2 | 0 2 4 6 3 | 0 3 6 9 and so on..The code that I have: int main(){ int input i, j; printf("Enter the upper limit for the table (0-9,inclusive): "); scanf("%d", &input); for (i = 0; i <= input; i++){ for (j = 0; j <= input; j++){ printf("%3d", (i*j)); } printf(" "); }return 0; } Does the following when its four: 0 0 0 0 0 0 1 2 3 4 0 2 4 6 8 0 3 6 9 12 0 4 8 12 16 any suggestions? X | 0 ---|--- 0 | 0 or when its 3: X | 0 1 2 3 ---|------------ 0 | 0 0 0 0 1 | 0 1 2 3 2 | 0 2 4 6 3 | 0 3 6 9 and so on..The code that I have: int main(){ int input i, j; printf("Enter the upper limit for the table (0-9,inclusive): "); scanf("%d", &input); for (i = 0; i <= input; i++){ for (j = 0; j <= input; j++){ printf("%3d", (i*j)); } printf(" "); }
return 0; } Does the following when its four: 0 0 0 0 0 0 1 2 3 4 0 2 4 6 8 0 3 6 9 12 0 4 8 12 16 any suggestions? ---|--- 0 | 0 or when its 3: X | 0 1 2 3 ---|------------ 0 | 0 0 0 0 1 | 0 1 2 3 2 | 0 2 4 6 3 | 0 3 6 9 and so on..The code that I have: int main(){ int input i, j; printf("Enter the upper limit for the table (0-9,inclusive): "); scanf("%d", &input); for (i = 0; i <= input; i++){ for (j = 0; j <= input; j++){ printf("%3d", (i*j)); } printf(" "); }
return 0; } X | 0 1 2 3 ---|------------ 0 | 0 0 0 0 1 | 0 1 2 3 2 | 0 2 4 6 3 | 0 3 6 9 and so on..The code that I have: int main(){ int input i, j; printf("Enter the upper limit for the table (0-9,inclusive): "); scanf("%d", &input); for (i = 0; i <= input; i++){ for (j = 0; j <= input; j++){ printf("%3d", (i*j)); } printf(" "); }
return 0; } int main(){ int input i, j; printf("Enter the upper limit for the table (0-9,inclusive): "); scanf("%d", &input); for (i = 0; i <= input; i++){ for (j = 0; j <= input; j++){ printf("%3d", (i*j)); } printf(" "); }
return 0; } Does the following when its four: 0 0 0 0 0 0 1 2 3 4 0 2 4 6 8 0 3 6 9 12 0 4 8 12 16 any suggestions? 0 0 0 0 0 0 1 2 3 4 0 2 4 6 8 0 3 6 9 12 0 4 8 12 16 any suggestions?
Explanation / Answer
please rate - thanks int main(){ int input, i, j; printf("Enter the upper limit for the table (0-9,inclusive): "); scanf("%d", &input); printf(" X|"); for(i=0;iRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.