Discussion in 'QnA (read only)' started by sourav, May 21, 2005.
on entering no. above 30 it has some problems. If I go above 30 it shows wrong negative ans.
hi saurav. It seems u r new to C or C++. its real simple. for inputs above 30 , the result is bound to go negative, as the datatype u r using is int .rather u should use "long int" in place of int. this should solve ur problem.if not , PM me n i will send u the sol.
rajrulesdear is right and i think there is a PM kidding all over the forum
wat do u mean by pm kidding?
hey another thing !!! the program written above is not C++ it is a c based program!!!!
Coz in c++ cout<<"The line to print on screen comes here !!!";
sourav r u in school? 11th or 12th cbse????
or maybe ur upgrading from C to C++ !!!!!????????
Separate names with a comma.