Question

Write a pseudocode to represent the logic of a program that allows the user to enter...

Write a pseudocode to represent the logic of a program that allows the user to enter the rainfall for 12 months (January to December). The output will consist of the total rainfall for the year and the average rainfall for the 12 months.

Homework Answers

Answer #1


       OUTPUT "Enter the rain fall in inches for each";
       DECLARE sum = 0, n = 0;
       months= { "January", "February", "March", "April", "May", "June", "July", "August", "September",
               "October", "November", "December" };
       double arr[12];
       LOOP I 1 TO 12:
           OUTPUT "Enter the rain fall for month ", months[i]:
           READ arr[i]
           sum += arr[i];

       LOOP END
      
       // finding the min
       int min = 0;
       LOOP I 1 TO 12:
           IF (arr[min] > arr[i])
               min = i;
       int max = 0;
       //finding the max
       LOP I 1 TO 12:
IF (arr[max] < arr[i])
               max = i;
   OUTPUT: "Total rainfall for the year is ", sum
       OUTPUT: "Average rainfall for the year is " , (sum / 12)
       OUTPUT: "The Largest amount of the rainfaill in year is " , arr[max] , " inches in " , months[max]
       OUTPUT: "The smallest amount of the rainfaill in year is " , arr[min] , " inches in " , months[min]

  

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Write a pseudocode to represent the logic of a program that allows the user to enter...
Write a pseudocode to represent the logic of a program that allows the user to enter an item description, quantity on hand, and unit price. The program will calculate the total price of all the items on hand. The output will consist of the item description, quantity on hand, unit price, and the total price.
1.Write pseudocode for a program that allows the user to input two numbers (X and Y)...
1.Write pseudocode for a program that allows the user to input two numbers (X and Y) and a code C. If the code has value 1, the program should output the larger of X and Y and otherwise output the smaller. Now convert your pseudocode to an assembly language program. Enter the program into the lab software assembler. Assemble the program and execute it with different input data. 2. Write pseudocode for a program that allows the user to input...
Design the logic for a program that allows a user to enter 10 numbers, stores the...
Design the logic for a program that allows a user to enter 10 numbers, stores the numbers in an array, then displays all of the numbers, the largest number, and the smallest.  create a solution algorithm using pseudocode  create a flowchart Need to do flowchart in Raptor and can't get it to do min and max or display the array
Q: Design a program that lets the user enter the total rainfall for each of 12...
Q: Design a program that lets the user enter the total rainfall for each of 12 months into an array. The program should calculate and display the total rainfall for the year, the average monthly rainfall, and the months with the highest and lowest amounts. Create parallel arrays for the month names and rainfall amounts for each month. Use month names (i.e. January, February, March, etc.) when printing out the months with the highest and lowest amounts. Include a modular...
Write a program that allows the user to enter the last names of five candidates in...
Write a program that allows the user to enter the last names of five candidates in a local election and the votes received by each candidate. The program should then output each candidate’s name, votes received by that candidate, and the percentage of the total votes received by the candidate. Your program should also output the winner of the election. A sample output is as follows: Candidate Johnson Miller Duffy Robinson Sam Votes Received 5000 4000 6000 2500 1800 19300...
Create pseudocode to represent the logic of your program that: Asks the user how many Darth...
Create pseudocode to represent the logic of your program that: Asks the user how many Darth Vader Check Print Silk Ties they want to buy. Each Darth Vader Check Print Silk Tie costs the user $64.99. Calculate how much the user will spend. If the user spends over $200.00, they are a big spender. You will set the value of a character variable to indicate whether they are a big spender or not. Display a message stating how much the...
DATA STRUCTURE /C++ Write a program that allows the user to enter the last names offive...
DATA STRUCTURE /C++ Write a program that allows the user to enter the last names offive candidates in a local election and the votes received by each candidate. The program should then output each candidate’s name, votes received by that candidate, and the percentage of the total votes received by the candidate. Your program should also output the winner of the election. A sample output is as follows: Candidate Johnson Miller Duffy Robinson Sam Total Votes Received 5000 4000 6000...
C++ please Write a program that allows a user to enter any number of product prices...
C++ please Write a program that allows a user to enter any number of product prices and show the total of all of the products. Use 0.00 as a sentinel value. (while loop)
Please use Python 3 4). Write a program that asks the user to enter 10 numbers....
Please use Python 3 4). Write a program that asks the user to enter 10 numbers. The program should store the numbers in a list and then display the following data: • The lowest number in the list • The highest number in the list •The total of the numbers in the list • The average of the numbers in the list   Sample input & output: (Prompt) Enter Number 1: (User enter) 4 (Prompt) Enter Number 2: (User enter) 7...
Problem description: Design the logic in pseudocode for a family membership management program to be used...
Problem description: Design the logic in pseudocode for a family membership management program to be used at Sweaty Time Gym. Monthly membership fees are $30 per adult and $10 per child. When the family first signs up for membership, a one-time activation fee of $50 (for the entire family, not per person) is charged. The program must allow the user to enter the number of adults and number of children in the family, and output the totals for adults and...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT