Advertisement
shabaduday

Computer Programming Problem C | Average

Jul 3rd, 2014
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.28 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5.     float a,b,c;
  6.     cout<<"Enter first number: ";
  7.     cin>>a;
  8.     cin.get();
  9.     cout<<"Enter second number: ";
  10.     cin>>b;
  11.     cin.get();
  12.     cout<<"Enter third number: ";
  13.     cin>>c;
  14.     cout<<endl<<"Average: "<< ( a + b + c ) / 3;
  15.     return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement