#include<stdio.h>main()int i,j;i=1;while(i<=10)j=1;while(j<=10){printf("%d x %d = %d",i,j,i*j);j++;printf("");i++;}. Give out put

Computer Science

ScanSolve AI Answer

Answer

This C program generates multiplication tables from 1 to 10.

The outer while loop iterates i from 1 to 10. For each value of i, the inner while loop iterates j from 1 to 10. Inside the inner loop, it prints the product of i and j. After each multiplication table (i.e., after the inner loop completes for a given i), two newline characters are printed, creating a blank line between tables.

Here is a partial output to illustrate the pattern:

1 x 1 = 1
1 x 2 = 2
1 x 3 = 3
1 x 4 = 4
1 x 5 = 5
1 x 6 = 6
1 x 7 = 7
1 x 8 = 8
1 x 9 = 9
1 x 10 = 10


2 x 1 = 2
2 x 2 = 4
2 x 3 = 6
2 x 4 = 8
2 x 5 = 10
2 x 6 = 12
2 x 7 = 14
2 x 8 = 16
2 x 9 = 18
2 x 10 = 20


3 x 1 = 3
3 x 2 = 6
...

This pattern continues for all values of i up to 10.

The final output will be the multiplication tables for numbers 1 through 10, each table followed by two blank lines.

Was this helpful?

Still stuck on this one?

Ask a follow-up, and the answer starts from this question.

Got a different question?Ask your own question