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

Area under curve, write a program to find the area under curve y=f(x) betwe...

write a program to find the area under curve y=f(x) between x=a and x=b,integrate y=f(x) between the limits a and b

Define the data type qualifiers in c language, Define the Data Type Qualifi...

Define the Data Type Qualifiers in c Language? 1. const 2. volatile const: The const qualifier is used to tell C that the variable value can't change after initialization.

C++, how do i write a c++ program that will input a number and output its f...

how do i write a c++ program that will input a number and output its factorial using the while loop

Assigment, C++ Programming Assignment ATM Machine Phase 1 In this assign...

C++ Programming Assignment ATM Machine Phase 1 In this assignment you will create a program that allows a user to do the following: 1) Create a bank account by supplying a use

C program for function of divider , C Program for FUNCTION OF DIVIDER ...

C Program for FUNCTION OF DIVIDER int gcd(int , int); void main() {           int m=0,n=0,k=0;           clrscr();           printf("ENTER THE FIRST DIGIT: ");

Program for basically a small store, ¦It should ask customers to enter deta...

¦It should ask customers to enter details such as their names and addresses. ¦It should print a welcome message that includes the customer’s name. ¦It should provide a list of avai

Palindrome, A palindrome is a string that reads the same from both the ends...

A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome

Produce an executable file, Requirements Create a "makefile" that w...

Requirements Create a "makefile" that will manage the construction of a program The name of the makefile must be: makefile The make file must produce an executable

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