| | |
One dimensional arrays of integers problem
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Dec 2008
Posts: 1
Reputation:
Solved Threads: 0
I cant get the output to display the average, high, and low. Any hints?
I am very new at C++, I dont know where or how to add the High, Low, and Average in?
Any help would be greatly appreciated.
Thanks,
Mac
C++ Syntax (Toggle Plain Text)
/* Write a program that prompts the user for test scores (doubles). The user enters -1 to stop the entry. After all of the test scores have been entered, calculate the average, the highest and the lowest test score. Use the code below as a template. Make sure you respond appropriately when no test scores are entered. Use the following screen shots as a guide. */ #include <iostream> using namespace std; int main() { double scores[75]; int counter = -1; do { counter++; cout << "Please enter a score (enter -1 to stop): "; cin >> scores[counter]; } while (scores[counter] >= 0); }
I am very new at C++, I dont know where or how to add the High, Low, and Average in?
Any help would be greatly appreciated.
Thanks,
Mac
You need to increment counter in while loop.
![]() |
Similar Threads
- Multyplying one dimensional dynamic arrays(matrix) (C++)
- Pointers (archived tutorial) (C++)
- I have Problems with Airline Reservations System, A bucket sort and a Turtle Graphic (C++)
- Please assist me with these question! (C++)
- Please help. Give me a solution (C++)
- A lovely mixture of random numbers and arrays (C++)
- How to extract words from char type string (C++)
- Pointers (C++)
- Pointers (Part II) (C)
- How do I create a program using an Array ? (C++)
Other Threads in the C++ Forum
- Previous Thread: MSXML
- Next Thread: building and creating the c++ dll wrapper
| Thread Tools | Search this Thread |
api array arrays based beginner binary bitmap c++ c/c++ calculator char char* class classes coding compile compiler console conversion convert count data database delete desktop developer directshow dll dynamiccharacterarray email encryption error file forms fstream function functions game generator getline google graph homeworkhelper iamthwee ifstream input int integer java lib linkedlist linux list loop looping loops map math matrix memory multiple news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference return rpg sorting string strings struct template templates text tree unix url vector video visualstudio win32 windows winsock word wordfrequency wxwidgets






