Question

Chapter 8 Do Programming Exercise 8-3 om page 414. Create a string array to hold the months of the year. Call it anything you

qbasic is the programming language
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer: Hey dear student finds the solution of your query if you have any doubt feel free to ask. Thanks!!

Qbasic Code:

CLS
DIM months$(12)
DIM rainfall(12), avg, sum
DIM max, min, maxM$, minM$
FOR j = 1 TO 12
READ months$(j)
NEXT j
FOR i = 1 TO 12
INPUT "Enter rain fall:"; rainfall(i)
sum = sum + rainfall(i)
NEXT i
avg = sum / 12
max = rainfall(1)
min = rainfall(1)
FOR x = 2 TO 12
IF rainfall(x) > max THEN
max = rainfall(x)
maxM$ = months$(x)
ELSEIF rainfall(x) < min THEN
min = rainfall(x)
minM$ = months$(x)
END IF
NEXT x
PRINT "Sum: ", sum
PRINT "Average: ", avg
PRINT "Max Rain: ", max, maxM$
PRINT "Min Rain: ", min, minM$
DATA Jan,Feb,March,April,May,June,July,Aug,Sep,Oct,Nov,Dec
END

1. Enter rain fall:? 1.1 Enter rain fall 2.3 Enter rain fall: Enter rain fall 4.35 Enter rain fall: Enter rain fall: Enter

Add a comment
Know the answer?
Add Answer to:
qbasic is the programming language Chapter 8 Do Programming Exercise 8-3 om page 414. Create a...
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. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • pseudocode and Python Repl.it :Recall that Programming Exercise 3 in Chapter 8 asked you to design...

    pseudocode and Python Repl.it :Recall that Programming Exercise 3 in Chapter 8 asked you to 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. Enhance the program so it sorts the array in ascending order and displays the values it contains.

  • starting out with c++ early objects 7th ed. chapter 8 programming challenges #7

    Rainfall StatisticsWrite a modular program that analyzes a year's worth of rainfall data. In addition to main, the program should have a getData function that accepts the total rainfallfor each of 12 months from the user, and stores it in a double array. It should also have four value-returning functions that compute and return to main thetotalRainfall, averageRainfall, driestRainfall, and wettestMonth. These last two functions return the number of the month with the lowest and highest rainfall amounts,not the amount...

  • Your next programming assignment at the Research Center is to write a program that reads data...

    Your next programming assignment at the Research Center is to write a program that reads data from a file and produces a report of rainfall for that period of time. The program should read the starting month name from the data file, then read an ending month name, followed by reading in monthly rainfall amounts for each of the months from the starting month through the ending month. As it reads the monthly totals, it should sum (accumulate) the rainfall...

  • Design a program that lets the user enter the total rainfall for each of 12 months...

    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 amount. PLEASE MODULARIZED THE CODE   PLEASE USE C PROGRAMMING AND ADD PSEUDOCODE

  • Write a program in C++ that lets the user enter the total rainfall for each of...

    Write a program in C++ that lets the user enter the total rainfall for each of 12 months into an array of doubles. 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. Input validation: Do not accept negative numbers for monthly rainfall figures.

  • how to make this program for c++ visual studio 2015. Also, can I show your working...

    how to make this program for c++ visual studio 2015. Also, can I show your working and program. Also, Can you have notice for pseudo code? For the first problem, please implement Problem 4 on page 142 (p 143, 7E) of the text. A scan of the problem is provided below. This problem asks you to calculate the average rainfall for three months. The program should ask the user to enter the name of each month, such as June or...

  • Write a python program where you create a list (you an create it in code you...

    Write a python program where you create a list (you an create it in code you do not have to use input() statements) that represents the total rainfall for each of 12 months (assume that element 0 is January and element 11 is December). The program should calculate and display the: 1) total rainfall for the year; 2) the average monthly rainfall; 3) the months with the highest and lowest amounts. You need to figure out how to access each...

  • The Problem Design a program that lets the user enter the total rainfall for each of...

    The Problem 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, the number of months above and below the average rainfall, and the highest rainfall for each quarter of the year. The Assignment Write a Java program that contains five method/functions as follows: main(). Calls the functions enterRain, rainStats, aboveBelow, and quarterlyRain. enterRain(). Uses...

  • Write a program that scores the total rainfall for each of 12 months into an array...

    Write a program that scores the total rainfall for each of 12 months into an array double. A sample array definition is shown below double thisYear[] = {1.6, 2.1, 1.7, 3.5, 2.6, 3.7, 3.9, 2.6, 2.9, 4.3, 2.4, 3.7}; The program should have the four functions to calculate the following 1. The total rainfall for the year 2. The average monthly rainfall 3. The month with most rain 4. The month with least rain Output: What to deliver? Your .cpp...

  • In Java language: Write a rainfall class that stores the total rainfall for each of 12...

    In Java language: Write a rainfall class that stores the total rainfall for each of 12 months of years 2015 -2017 into an 2D array of doubles. Use the text file at Actividades/Tareas link as input of rainfall data. The program should read the input data from a text file. The program should have methods that at least return the following: • Total rainfall for the years 2015 – 2017 - return a 1D array • The average monthly rainfall...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT