Write a program that produces the following output using for loop
1 2 3 4 5 6 7 8 9 | 100 200 202 300 304 308 400 406 412 418 . . . . 900 916 932 ... . ... ... .. .. 1028 |
program is…. This program is compiled in Turbo C++ compiler 3.0
——————————————————————–
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | #include<stdio.h> #include<conio.h> void main() { int x=0,i,j,a=0,b; clrscr(); for(i=100;i<=900;i+=100){ x=i/100; for(j=0;j < x;j++){ printf("%6d",i+(j*a)); } a=a+2; printf("\n"); } getch(); } |