Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Program to display table of a number till user wishes.
- #include<iostream.h>
- #include<conio.h>
- void main()
- {
- clrscr();
- int i,a;
- char z;
- do
- {
- clrscr();
- cout<<"Enter a number to display it's table: ";
- cin>>a;
- cout<<"Table of "<<a<<" is:"<<endl;
- for(i=1;i<=10;i++)
- cout<<a<<" X "<<i<<" = "<<a*i<<endl;
- cout<<"Do you wish to enter more? (y/n): ";
- cin>>z;
- }
- while(z=='y'||z=='Y');
- }
Advertisement
Add Comment
Please, Sign In to add comment