Answer to Question #37092 in C++ for mariam

Question #37092
hi can you help me with this question? Write a program that utilizes looping to print the following table of values. Sample Output : N 10*N 100*N 1000* N 1 10 100 1000 2 20 200 2000 3 30 300 3000 4 40 400 4000 5 50 500 5000 6 60 600 6000 7 70 700 7000 8 80 800 8000 9 90 900 9000 10 100 1000 10000 i need it with
Expert's answer
#include <stdio.h>

//main function
int main()
{
printf ("N 10*N 100*N 1000* N\n");
//show result
for (int i=1;i<=10;i++) {
int N=1;
for (int j=1;j<=4;j++){
printf ("%d ",i*N);
N*=10; //*10
}
printf ("\n"); //new line
}
int k;
scanf ("%d",&k); //pause
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 first!

Leave a comment

Ask Your question

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS
paypal