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

Define the keywords of c language, Define the Keywords of c language? C...

Define the Keywords of c language? C keeps a small set of keywords for its personal use. These keywords can't be used as identifiers in the program. Here is the list of keyword

Define procedure that take argument or return integral value, Simpson's Rul...

Simpson's Rule is a more accurate method of numerical integration than the method described in class. Using Simpson's Rule, the integral of a function f between a and b is approxim

#program, Ask question #Minimum 100 words accepted program for polishin...

Ask question #Minimum 100 words accepted program for polishing jewels#

Why can''t one open a file in a different directory , Why can't one open a ...

Why can't one open a file in a different directory like "..\test.dat"? A: Since " " is a tab character. You must employ forward slashes in your filenames, even on operating s

Explain multiple inheritance, Multiple Inheritance Multiple inheritance ,...

Multiple Inheritance Multiple inheritance , as the name suggests , is  deriving a class from more than one class . The derived class inherits all the properties of all its base c

Program to define an array in c, Program to define an array in c: Writ...

Program to define an array in c: Write a program to define an array and print the value of array. void main() { int a[10]={0,11,21,34,44,75,46,57,88,89},i,j,k; clr

What is a template in c++, Templates permit to create generic functions tha...

Templates permit to create generic functions that admit any data type as parameters and return value without having to overload the function with all the possible data types. Until

Resection method, recsection method source code for searching position

recsection method source code for searching position

Write a program to create a binary file, Write a program to create a binary...

Write a program to create a binary file and store the following data "hello", 0x0030,'1', 1.234  Using visual studio examine the binary file and note how the day is stored   Answe

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