C++ int type truncation

Description

C++ int type truncation

#include <iostream>
using namespace std;
int main()  // a program illustrating integer truncation
{
   cout << "answer1 is the integer " << 9/4;
   cout << "\nanswer2 is the integer " << 17/3;
   return 0;//from w ww. j  a v  a2  s  . c  om
}



PreviousNext

Related