Hello This is my 1st time using dev-c++ and when i compile and run this code i get a box asking for the input as i ask for it and after i put a number and hit enter, cmd just closes without finishing the code! thanks for the help!
#include <iostream.h>
using std::cout;
using std::cin;
int 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;
}
}
#include <iostream.h>
using std::cout;
using std::cin;
int 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;
}
}