Ads 468x60px

Saturday 10 December 2011

C++ program to print first 10 multiples of a number

This is a simple C++ program which print first 10 multiples of a number n, where n is to be entered by the user. The program goes as follows:

#include 
#include 
main()
{
 int N, i;
 clrscr();
 cout  << "Enter the number to find the multiple ";
 cin >> N;
 // Printing the multiple of N
 for (i =  1; i<=10; i++)
  cout << N << "  *  " <<  i  <<  " =" << N * i  << endl;
 return 0;
}


Source: www.LearnCandCpp.com

No comments:

Post a Comment