#include<stdio.h>
int main () {
int x,y,z;
printf("Enter the three numbers:\n");
scanf("%d%d%d",&x,&y,&z);
if ((x*y<y*z) && (x*y<z*x))
{
printf("The smallest product is %d of %d and %d",x*y,x,y);
}
if ((y*z<x*z) && (y*z<x*y))
{
printf("The smallest product is %d of %d and %d",y*z,y,z);
}
if((z*x<x*y)&&(z*x<y*z))
{
printf("The smallest product is %d of %d and %d",z*x,z,x);
}
return 0;
}
Have a Read!
Hi Everyone.
The idea for this page is to provide new c users simple c tutorials to learn how to develop the logic and more importantly correct way to write syntax.
ENJOY !!!
Wednesday, January 26, 2011
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment