Hello i wrote this c++ code and when i try to compile it i get bunch of errors and i can't find out what's wrong with it thanks!
p.s. i use dev-C++ 4.9.9.2
#include <iostream.h>
void main()
{
double number1;
double square;
double cube;
cout<< "Enter number nows" endl;
cin>> number1;
if (number1 >= 50);
(
square= number1 * number1;
cout<< "The square is" <<square;
)
else if (number1<50);
cube= number1 * number1 * number1;
cout<< "The cube is " <<cube;
}
Thanks for pointing out my errors however i still get few errors when i try to compile
I shall list the errors in hope of getting some more help...
Line 32:2 # warning this file includes atleast one deprecated or antiquated header.please consider using one of the 32 headers found in section 17
line7 'main' must return 'int'
THANKs Again!
p.s. i use dev-C++ 4.9.9.2
#include <iostream.h>
void main()
{
double number1;
double square;
double cube;
cout<< "Enter number nows" endl;
cin>> number1;
if (number1 >= 50);
(
square= number1 * number1;
cout<< "The square is" <<square;
)
else if (number1<50);
cube= number1 * number1 * number1;
cout<< "The cube is " <<cube;
}
Thanks for pointing out my errors however i still get few errors when i try to compile
I shall list the errors in hope of getting some more help...
Line 32:2 # warning this file includes atleast one deprecated or antiquated header.please consider using one of the 32 headers found in section 17
line7 'main' must return 'int'
THANKs Again!