close
#include
#include
int f1 (int e, int f, int g, int h)
{
int w;
w = (e+f)*(g+h);
return w;
}
double f2 (int e, int f, int g, int h)
{
double m;
m= 1.0*(e+f)/(g+h);
return m;
}
int main()
{
int a, b, c, d, x ;
double y;
printf("Please key in 4 intergers: \n");
scanf("%d %d %d %d" ,&a ,&b ,&c ,&d);
x = f1(a,b,c,d);
y = f2(a,b,c,d);
printf("(a+b)*(c+d)= %d \n(a+b)/(c+d)= %lf ",x ,y);
system("PAUSE");
return 0;
}
全站熱搜