August 14th, 1999, 05:16 AM
Hello
When I run this program in Borland C++
it seems to work fine except that the output window
opens and closes itself at once...
...what should be written in the code to make the window stay?
#include <iostream.h>
int main()
{
cout << "Hello there.\n";
cout << "Here is 5: " << 5 << "\n";
cout << "The manipulator endl writes a new line to the screen." << endl;
cout << "Here is a very big number:\t" << 70000 << endl;
cout << "Here is the sum of 8 and 5:\t" << (8+5) << endl;
cout << "Here's a fraction:\t\t" << (float) 5/8 << endl;
cout << "And a very very big number:\t" << (double) 7000 * 7000 << endl;
cout << "Don't forget to replace Jesse Liberty with your name...\n";
cout << "Jesse Liberty is a C++ programmer!\n";
return 0;
}
greetings
grok from sweden
When I run this program in Borland C++
it seems to work fine except that the output window
opens and closes itself at once...
...what should be written in the code to make the window stay?
#include <iostream.h>
int main()
{
cout << "Hello there.\n";
cout << "Here is 5: " << 5 << "\n";
cout << "The manipulator endl writes a new line to the screen." << endl;
cout << "Here is a very big number:\t" << 70000 << endl;
cout << "Here is the sum of 8 and 5:\t" << (8+5) << endl;
cout << "Here's a fraction:\t\t" << (float) 5/8 << endl;
cout << "And a very very big number:\t" << (double) 7000 * 7000 << endl;
cout << "Don't forget to replace Jesse Liberty with your name...\n";
cout << "Jesse Liberty is a C++ programmer!\n";
return 0;
}
greetings
grok from sweden