Sunday 21 December 2014

Q.WAP to input two numbers m and n and display first m
multiples of n.

#include<iostream.h>
#include<conio.h>
void main()
{
 clrscr();
 int m,n;
 cout<<"Enter two numbers:";
 cin>>m>>n;
 for(int i=0;i<=m;i++)
 {
      cout<<n<<"*"<<i<<"="<<n*i;
      cout<<endl;
 }
 getch();
}

No comments:

Post a Comment