write a program to displat table of a number

A number is taken from user and its table upto n is displayed.


Select To use this code as it is.. select and copy paste this code into code.cpp file :)



  1. #include<iostream.h>
  2. #include<conio.h>
  3. void main()
  4. {
  5. clrscr();
  6. int n,m;
  7. cout<<"Please enter n: ";
  8. cin>>n;
  9. for (int i=1;i<=10;i++)
  10. //Coding by: Snehil Khanor
  11. //http://WapCPP.blogspot.com
  12. {
  13. m=n*i;
  14. cout<<n<<"*"<<i<<"="<<m<<endl;
  15. }
  16. getch();
  17. }

Check out this stream