write a program to calculate the timetable for


Write a program to calculate the timetable for numbers 1 -> 10 and display them as follows. Your solution should use for do loops
    
#include stdio.h
void main()

  char prompt;
  int x;
/* The maximum answer is 100 i.e 3 characters. Therefore we will use a format sepecification of %3d and 2 spaces i.e %5d */

printf("\t\t\t Timestable \n\r");

printf("\t\t\t __________ \n\n\r");

printf("          1     2     3     4     5     6     7     8     9    10\n\r");

printf("\n\r");

for (x=1;x <=10;x++)
  {
printf("%5d%6d%6d%6d%6d%6d%6d%6d%6d%6d%6d  \n\r",
  x,x,2*x,3*x,4*x,5*x,6*x,7*x,8*x,9*x,10*x);
  }   
printf("Press any key to exit \n\r");
scanf("\n%c",&prompt); 
}

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: write a program to calculate the timetable for
Reference No:- TGS0414849

Expected delivery within 24 Hours