0

Im just beginning on C++, and one of the main problems that Ive encountered that I would like to get past is the fact that with simple programs you can only enter one thing, and after the code executed after that function is done, all you can do is press enter and the application quits.
The most complex program I have made tells you to input a country. Three countries are displayed across the top, and a number is assigned to each one. You type that number in and press enter and a printf function shows some text talking about that country. But after that, all you can do is press enter and the application closes. Can anyone help me with getting past this? I want it to be where you can enter another country other than the one you just looked at and it will display the data for that country too.
I think that it might have something to do with variables and looping? (Which I know a few things about.)

2
Contributors
1
Reply
2
Views
12 Years
Discussion Span
Last Post by Dave Sinkula
0

Can anyone help me with getting past this? I want it to be where you can enter another country other than the one you just looked at and it will display the data for that country too.
I think that it might have something to do with variables and looping? (Which I know a few things about.)

Write code. If you want to answer lots of questions, write lots of questions. If you want to keep your answers, store them in lots of variables. If you want to make life easier, learn about arrays and looping.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.