fork download
  1. #include<stdio.h>
  2. int main()
  3. {
  4. int a,b,c,sum;
  5. float avg;
  6. scanf("%d %d %d",&a,&b,&c);
  7. sum=a+b+c;
  8. avg=(sum/3);
  9. printf("\n The summation of three number are=%d",sum);
  10. printf("\n Average of three number are=℅.2f",avg);
  11. }
Success #stdin #stdout 0.01s 5496KB
stdin
2
4
4
stdout
 The summation of three number are=10
 Average of three number are=℅.2f