Monday, July 12, 2010

a program to multiply 3 numbers and print accordingly if sum is greater than 10,000 or less than 10,000

#include
#include
void main()
{
clrscr();
int a,b,c,p;
cout<<"enter 1st number: ";
cin>>a;
cout<<"enter 2nd number: ";
cin>>b;
cout<<"enter 3rd number: ";
cin>>c;
p=a*b*c;
if (p>=10000)
cout<<"the product is greater than 10000";
else
cout<<"the product is less than 10000";
getch();
}

No comments:

Post a Comment