Stop using whatever compiler you're using and get a C++ compiler. Your code is not C++ code and contains much out of date and horribly non-portable code.
Apart from that, what problem does this code not solve?
#include <iostream>
#include <math.h>
usingnamespace std;
int main(void)
{
char* str[255];
double a=3.9;
double b=2.3;
cout<< "The floor value of a is : "<< floor(a) << endl;
cout<< "The floor value of b is : "<< floor(b) << endl;
cout<< "The ceiling value of a is : "<< ceil(a)<< endl;
cout<< "The ceiling value of b is : "<< ceil(b) << endl;
/*dont use system("pause") unless your testing code or playing around with your own code, you can use this*/
fgets(str[255],255,stdin);
return 0;//thats why theres an int next to the def of the main function
}
The output is here:
the floor value of a is: 3
the floor value of b is: 2
the ceiling value of a is: 4
the ceiling value of b is: 3
_
I agree with Moschops get a good c++ compiler like devc++ or code::blocks
also study up on your c++ syntex, a good place is youtube look up thenewboston, on his page search "c++ tutoral"(thats where i learned my c++).
also make sure that you look for typos befor you submit a code.
of course i meant Wxdev-c++ *cough* *cough*(quickly downloads latest version)... i personal think that if your learning the language it dosent matter what ide you use, like if you were going to be learning java and were compiling the files using bluej instead of eclipse.
i personal think that if your learning the language it dosent matter what ide you use
Unless one uses an IDE that comes bundled with a compiler that is simply not conformant; in that case, as with Dev-C++, one could end up learning something that isn't actually C++ and not know it.