C++ cin Read more than one value

Description

C++ cin Read more than one value

#include <iostream>
using namespace std;
int main()/*from   w w  w.j  ava2s .c  om*/
{
   int num1, num2, num3;
   double average;
   cout << "Enter three integer numbers: ";
   cin  >> num1 >> num2 >> num3;
   average = (num1 + num2 + num3) / 3.0;
   cout << "The average of the numbers is " << average << endl;
   return 0;
}



PreviousNext

Related