Monday, October 1, 2012

C++ - To multiply two numbers

#include<iostream.h>
#include<conio.h>
int main(void)
{
   int x;
   int y;
   int res;
   cout<<"Enter X : ";
   cin>>x;
   cout<<"Enter Y : ";
   cin>>y;
   res=x*y;
   cout<<"X * Y = "<<res<<" where X = "<<x<<" and Y = "<<y;
   getch();
   return 0;
}

0 comments:

Post a Comment