Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Suppose you want to write a program to keep track of our account balances for ou

ID: 3647874 • Letter: S

Question

Suppose you want to write a program to keep track of our account balances for our seven credit cards. Write a program that accepts seven account balances and stores them into a table (which is another name for an array). Once the balances are in the array, we can process them again and again.

First, load the account balances in your array. Second, display the contents of the array in order. Third, display the array in reverse order. Fourth, calculate the average of the seven account balances entered in the array. Finally, the algorithm should display all the account balances in the array that are larger than the previously calculated average. Make sure you use some output statements to clarify all the details you are displaying, being cautious about spelling and communicating to your user.

What code would you use?

I would like help writing a pseudocode for this program.

Explanation / Answer

Alright there are two ways which we can really do this, the first is the most efficient(aka have to read through the entire array the least amount of times) or to do each of the steps one at a time without getting more data then we need for the next steps. So most efficient: For 1 to 7 Load each balance into its own table row and column. Display each balance as we store it. End For Temporary variable with value of 0 For 7 to 1 Display each of the balances in reversed order Add balance into temporary value. End For Divide temporary value by 7 getting the average. Display the average For 1 to 7 if average
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote