C++ int type and arithmetic operator

Description

C++ int type and arithmetic operator

#include <iostream>
using namespace std;
int main()/*from  www  .j  a v a  2 s  .  c  o  m*/
{
   int num1, num2, total;
   num1 = 25;
   num2 = 30;
   total = num1 + num2;
   cout << "The total of" << num1 << " and "
   << num2 << " is " << total << endl;
   return 0;
}



PreviousNext

Related