C++ FindMean


SUBMITTED BY: fuyuki2015

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

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

FORMAT: C

SIZE: 469 Bytes

HITS: 3153

  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. //header
  7. cout<<"Created by Sorawich Chanjirakitti Visit my blog at www.sorawich.com"<<endl;
  8. //input
  9. cout<<"Enter the first number >>"; cin>> a;
  10. cout<<"Enter the second number >>"; cin>> b;
  11. cout<<"Enter the third number >>"; cin>> c;
  12. //process
  13. mean=(a+b+c)/3;
  14. //output
  15. cout<<"Result is :"<<mean;
  16. return 0;
  17. }

comments powered by Disqus