• For example, when calculating sin(x), I get the user to input an x value. Then program then (hopefully) calculates the correct value of sin(x). I can't tell though, because as soon as it runs, the little black box it is in goes away. What sort of command do I need to use in order to get it to hold on and continue to display whatever output it has?


  • What language are you writing in?
    --
    Microsoft Visual Studio supports C?
    Ok well I'll just assume you're using cin and cout not printf and sprintf.

    Multiple methods:
    char inp[2];
    cout << "Press enter to continue" << endl;
    cin >> inp;
    return 0;

    getch() is another method: example

    cout << "Press a key to continue" << endl;
    getch();
    return 0;







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about Using Microsoft Visual Studio, how do you get output to stay on the screen after the program is done? , Please add it free.