Sunday, 9 October 2016

Program to print multiples of any no. acc. to user's choice .

#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int a,b;
cout<<"Enter the no. whose multiple you want to print ";
cin>>a;
cout<<"Enter the no. of multiples ";
cin>>b;
for (int i=1;i<=b;i++)
{ cout<<i*a<<"\n";
}
getch();
}

No comments:

Post a Comment

Basic Implementation of Array as a Pointer

#include<iostream.h> #include<conio.h> void main() { clrscr();   int arr[5];   cout<<"Enter 5 nos. ";   f...