Write a program to calculate the average of three real numbers.


int main()

  int a,b,c, sum; 

  float d; 

  printf(“Please enter 3 numbers”); 




  printf(“\nSum is %d”, sum); 

  printf(“\nAverage is  %f”,d);

  return 0;



Please enter 3 numbers: 4 6 2

Sum is 12

Average is  4.000000

Leave a Reply

Your email address will not be published. Required fields are marked *