C++ FindMean


SUBMITTED BY: fuyuki2015

DATE: Dec. 6, 2015, 8:20 a.m.

UPDATED: July 9, 2017, 9:45 a.m.

FORMAT: C++

SIZE: 375 Bytes

HITS: 3152

  1. This is a code of C++ programming to find mean of 3 numbers.
  2. #include <iostream>
  3. using namespace std;
  4. int main ()
  5. { float a,b,c,mean;
  6. //input
  7. cout<<"Enter the first number >>"; cin>> a;
  8. cout<<"Enter the second number >>"; cin>> b;
  9. cout<<"Enter the third number >>"; cin>> c;
  10. //process
  11. mean=(a+b+c)/3;
  12. //output
  13. cout<<"Result is :"<<mean;
  14. return 0;
  15. }

comments powered by Disqus