jmak
05-11-2004, 05:37 PM
Hey! I'm new to the board and I have a question about C++. I'm pretty new to the language, so please bare with me.
I have to write a program, but I have no idea how to start it. My teacher doesn't want to help us because we have to figure it out, but it's something we've never learned. So I'm asking for some help. Perhaps if it was started out I could figure out the rest or just see how to do it.
Write a program that finds the smallest of several integers. The program will first ask the user to enter the numbers of integers to be entered; second it will read the numbers from the keyboard and finally it will find and display the smallest of them.
I get that there will be for loop involved and probably the if statement. What I don't get is how to use the functions where you ask the user to enter numbers when you don't know the exact number. (Because if you did, then you would know how many times to include a variable after cin)
Thanks!
I have to write a program, but I have no idea how to start it. My teacher doesn't want to help us because we have to figure it out, but it's something we've never learned. So I'm asking for some help. Perhaps if it was started out I could figure out the rest or just see how to do it.
Write a program that finds the smallest of several integers. The program will first ask the user to enter the numbers of integers to be entered; second it will read the numbers from the keyboard and finally it will find and display the smallest of them.
I get that there will be for loop involved and probably the if statement. What I don't get is how to use the functions where you ask the user to enter numbers when you don't know the exact number. (Because if you did, then you would know how many times to include a variable after cin)
Thanks!