#include<stdio.h>
void main()
{
int
a,b;
float am,hm;
printf("Enter the values of a&b:");
scanf("%d%d",&a,&b);
am=a+b/2;
hm=a*b/a+b;
printf("\nArithmatic
mean=%f",am);
printf("\nHarmonic
mean=%f",hm);
}
Output
[root@localhost Desktop]# gcc am.c
[root@localhost Desktop]# ./a.out
Enter the values of a&b:56 98
Arithmatic mean=105.000000
Harmonic mean=196.000000 😃
0 coment�rios: