18 lines
322 B
C
18 lines
322 B
C
|
#include<stdio.h>
|
||
|
|
||
|
void calculate(double x,double y,double *he,double *cha,double *ji,double *shang){
|
||
|
*he=x+y;
|
||
|
*cha=x-y;
|
||
|
*ji=x*y;
|
||
|
*shang=x/y;
|
||
|
}
|
||
|
int main(){
|
||
|
double x,y,he,cha,ji,shang;
|
||
|
|
||
|
scanf("%lf %lf",&x,&y);
|
||
|
calculate(x,y,&he,&cha,&ji,&shang);
|
||
|
printf("%g %g %g %g",he,cha,ji,shang);
|
||
|
|
||
|
return 0;
|
||
|
}
|