Wednesday, June 27, 2012

To multiply two numbers

#include<stdio.h>
#include<conio.h>
int main(void)
{
   int x;
   int y;
   int res;
   printf("Enter X : ");
   scanf("%d",&x);
   printf("Enter Y : ");
   scanf("%d",&y);
   res=x*y;
   printf("X * Y = %d where X = %d and Y = %d",res,x,y);
   getch();
   return 0;
}

0 comments:

Post a Comment