Write a program to calculate the timetable, C/C++ Programming

Assignment Help:

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); 
}


Related Discussions:- Write a program to calculate the timetable

Program for implement vectors and iterators, - Write a program using vector...

- Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles. The user should be able to view all DVD titles in his library, add and d

Explain the function of five elements that are on a, explain the function o...

explain the function of five elements that are found on a motherboard#

Arrays within a class, A r r a y s w i t h i n a c l a s s:...

A r r a y s w i t h i n a c l a s s: I t i s j u s t d ecl a r i n g o r c on s t ru c ti n g a d e r i v e d t

C program to read the contents of a file, Program is to read the contents o...

Program is to read the contents of a file: void main()    {   ifstream fin("ascii.txt");   char ch;   while(! fin.eof())     {   fin>>ch;   cout     }

Filing in C++, how to search, display all data and delete data

how to search, display all data and delete data

Data structyres, What data structure would you mostly likely see in a nonre...

What data structure would you mostly likely see in a nonrecursive implementation of a recursive algorithm?Minimum 100 words accepted#

C code, how can i easily make a program?

how can i easily make a program?

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd