RUN AGAIN?

ANY ONE KNOW HOW TO MAKE THE PROGRAM BELOW RUN AGAIN IF THE USER PRESS THE 'Y'?



//TONY ANTONY



#include"iostream.h"



void main()



{



cout<<"HELLO"<<endl;<br>


cin.get();



}






Comments

  • Put your output and input in a "while" loop.



    : ANY ONE KNOW HOW TO MAKE THE PROGRAM BELOW RUN AGAIN IF THE USER PRESS THE 'Y'?

    :

    : //TONY ANTONY

    :

    : #include"iostream.h"

    :

    : void main()

    :

    : {

    :

    : cout<<"HELLO"<<endl;<br>
    :

    : cin.get();

    :

    : }

    :

    :

    :






  • : ANY ONE KNOW HOW TO MAKE THE PROGRAM BELOW RUN AGAIN IF THE USER PRESS THE 'Y'?

    :

    : //TONY ANTONY

    :

    : #include"iostream.h"

    :

    : void main()

    :

    : {

    :

    : cout<<"HELLO"<<endl;<br>
    :

    : cin.get();

    :

    : }

    :

    :

    :



    do {

    cout<<"HELLO"<<endl;<br>
    while(cin.get() == 'y');








Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories