C++ int type value Compare with constant value
#include <iostream> using namespace std; int main()//from w w w . java 2 s .c o m { const double LIMIT = 3000.0; int id; double miles; cout << "Please type in car number and mileage: "; cin >> id >> miles; if (miles > LIMIT) cout << " Car " << id << " is over the limit.\n"; cout << "End of program output.\n"; return 0; }