a C++ program that reads in two partially filled arrays. One array contains student IDs (with int type) and the other contains GPAs (with double type). The program will sort the two arrays according to the student ID and print out the results?
KAMAE94
0
Newbie Poster
Recommended Answers
Jump to PostYou need a sort algo.
Look up bubble sort. You will also need to use a nested for loop eg:
for { for { } }
Jump to PostYou don't have an array for the student IDs in your code. I assume that fillup is expected to fill that array at the same time it fills the GPAs. One would expect that the student ID values would be interleaved with GPA values in the input data (ID, GPA, …
All 7 Replies
KAMAE94
0
Newbie Poster
iamthwee
iJimJones
15
Newbie Poster
tinstaafl
1,176
Posting Maven
KAMAE94
0
Newbie Poster
ddanbe
2,724
Professional Procrastinator
Featured Poster
iJimJones
15
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.