Created and compiled a simple program in Dev C++. This program would display
New pay based on calculations. The progam allowed me to enter valid input, but the reults of the program did not come up. The screen just disappeared. The written source code showed no errors. Why am I not seeing the results of the program.
just put in a system("pause");
its not the cleanest or nicest way, but its nice and simple, it'll stop the program from exiting after calculating the pay, so your new code would be
# include <iostream>
using std::cout;
using std::cin;
using std::endl;
int main(void)
{
//declare variables
double currentPay=0.0;
double raiseRate=0.0;
double raise=0.0;
double newPay=0.0;
//enter input items
cout<< " Enter current weekly pay: ";
cin>> currentPay;
cout<< " Enter raise rate: ";
cin>> raiseRate;
//calculate raise and new pay
raise=currentPay*raiseRate;
newPay=raise+currentPay;
//display output item
cout<< "New pay: " << newPay << endl;
system("pause");
return 0;
} //end of main function