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;
}







全站熱搜
創作者介紹
創作者 alex2008 的頭像
alex2008

alex2008的部落格

alex2008 發表在 痞客邦 留言(0) 人氣()