Tags


Simple test to determine int or double in input stream –

cin>>a; if(a-(int)a==0) { cout<<“integer”; } else { cout<<“double”;

Advertisements