fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. // your code goes here
  5. double a,b,c,avg=0.0;
  6. a=0.0;
  7. b=0.0;
  8. c=0.0;
  9. printf("enter value of a");
  10. scanf("%f",&a);
  11. printf("value of b");
  12. scanf("%f",b);
  13. printf("value of c");
  14. scanf("%f",&c);
  15.  
  16. avg=(a+b+c)/3;
  17. printf("Average is %f",avg);
  18.  
  19. return 0;
  20. }
  21.  
Success #stdin #stdout 0s 4536KB
stdin
Standard input is empty
stdout
enter value of avalue of bvalue of cAverage is 0.000000