How Get Product Code On Sygic?

How do I get my dos window to stay open so that I can view the results for more than a second?

  • // homework5.cpp // By Catherine Bellamy #include "stdafx.h" #include <iostream> #include <iomanip> using namespace std; double Product(double, double); double Quotient(double, double); int main() { double num1, num2; //Prompt user for numbers. cout << "Enter the first number: "; cin >> num1; cout << endl; cout << "Enter the second number: "; cin >> num2; cout << endl; return 0; } //Call Product(). double Product(double num1, double num2) { double product; product = num1 * num2; cout << "Product is " << product << endl; return product; } //Call Quotient(). double Quotient(double num1,double num2) { double quotient; if (num2 == 0) cout << "Dividing by 0 is not allowed!"; else quotient = num1/num2; cout << "Quotient is " << quotient << endl; cin.get(); return quotient; } This is the code I have so far. It will build and debug but the window will not stay open long enough for me to see the results. Please Help!

  • Answer:

    Another way would be to right click on the file, select Properties, and select the "Program" tab and uncheck the "close on exit" box. NOTE: not all files have this option so you'll just have to see if your program does

Rinie at Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

before running this, open a command prompt start/run/ type ''cmd'' w/o the quotes this will open a dos window then you can see results

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.