User Profile
Collapse
-
Don't know if that was sarcasm or not...but yes I'm going over itLeave a comment:
-
You don't realize that I wasn't in a class with this like I've stated many times before this. I have not learned this stuff and am asking for help...this is not a classLeave a comment:
-
Is this the right start though?
int num[9];
while (num < 10) {
cout << "Enter a number: ";
cin >> num[0];
cout << "The 0th element in the array is " << num[0];
num = num + 1;
}
If not could you help out on what to put and whereLeave a comment:
-
Okay thanks...that helped with declaring the array but did nothing towards how I can ask the user 10 times to put a number then take it into the arrayLeave a comment:
-
no that's the thing...I haven't done arrays or C++...so I have no idea how to do themLeave a comment:
-
[CODE=cpp]int num;
num = 0;
while (num < 3) {
cout << "Enter a number: ";
cin >> num[0];
cout << "The 0th element in the array is " << num[0];
num = num + 1;
}[/CODE]
I know it's all wrong...but like I said I have never done this and have no idea.Last edited by r035198x; Aug 1 '07, 07:21 PM. Reason: Added code tags. Please don't forget them next timeLeave a comment:
-
Okay help me with the code so the program asks and takes into an array the 10 numbers that he/she puts in.Leave a comment:
-
Need Help With Arrays...
Okay so I'm at the University of Alberta testing out programs (I'm 15 btw with a year of programming and no C++). Anyway we have to do this program where it asks the user to input 10 numbers (All on different lines) and then put all those numbers on a single line and then average out all the numbers. Now we have to use an array using a while or for loop (Well they want me to do both...) now I've never done any array type coding so this is obviously... -
Okay I did this...it seemed to work for not stopping when I put a smaller number or the same...but when I put a bigger number it didn't work...will keep trying things but like I said I'm new to C++...but this was great, thanks for the help...Leave a comment:
-
Okay sorry...well the problem right now with my program is at random times (depending on the number I use) it will finish the program. The code looks okay but obviously is not...I'm fairly new to C++ and am not sure if my While loop is correct:
cout << "Enter a number greater than 10: ";
cin >> integer;
while (integer == 10) {
cout <<...Leave a comment:
-
Going Crazy Over Program
okay here is the task I must do...but I can't do it for the life of me...can any one of you figure this code out and show it to me?
3. Modify the above program, so that if the number entered is lower than 10 a message, "That number is lower than 10" is printed. If the number entered is equal to 10, a message, "That number is equal to 10" is printed . If the number entered is higher than 10, a message...
No activity results to display
Show More
Leave a comment: