PROGRAMMING LOGIC AND DESIGN, COMPREHEN
9th Edition
ISBN: 9781337576239
Author: FARRELL
Publisher: Cengage
expand_more
expand_more
format_list_bulleted
Question
error_outline
This textbook solution is under construction.
Students have asked these similar questions
A business law class of 25 students takes a midterm exam
that has 100 true- or-false questions. The instructor, who is
also a computer fanatic, wants to devise a program to obtain
a printout with the student's name, score, and letter grade,
according to the following schedule:
50
or below
F
51 - 55
D
56 – 60
C-
61 - 65
66 – 70
C+
71 - 75
B-
76 - 80
81 - 85
86 – 90
B
B+
А-
91 - 95
A
96 – 100
A+
In addition, the instructor wants to include the total number
of students scoring each of the 11 possible grades.
How would you use the FORTRAN language to solve
his problem?
Written in C# Language Please!
A fixed percentage of water is taken from a well each day.
Request values for W and P where:
▪ W is the amount (in litres) of water in the well at the start of the first day
▪ P is the percentage of the water in the well taken out each day
Write a program to print the number of the day, the amount taken for that day and the amount remaining at the end of the day. The output should be terminated when 30 days have been printed or the amount of water remaining is less than 100 litres, whichever comes first. For example, if W = 1000 and P = 10, the output should start as follows:
Day
Amount Taken
Amount Remaining
1
100
900
2
90
810
3
81
729
Note: The amount taken and amount remaining should be displayed to 2 decimal places.
Read the user the number of groups (minimum 6)
• For each group: group name and the number of students minimum 10 are entered.
• For each student in a group: grade should be entered, and grade category has to be computed and
printed.
• For each group, the number of student and percent ratio in each grade category should be computed
and printed.
• Finally, the program should print a summary report with the following details:
1. Number of groups.
2. Total number of students and percent ratio of students in each grade category in all groups.
3. The name of the best group which has the maximum percent of students in grade A category and
these students percent ratio.
4. The name of the worst group which has the maximum percent of students in the grade F category and
these students percent ratio.
grade category
А
90–100 %
80-89 %
70–79 %
D
60-69 %
F
< 50 %
ps; this program should not use array and only one main method
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Java Language The company will held its quarterly performance for each department; wherein each group of the department are rated from 1 to 5, where 1 is the lowest score and 5 is the highest score. The department has two groups, groupA and groupB. Each group will be rated by five evaluators. Create a program that will ask for the input rate of the evaluators, and determine the group that got the highest rating, as well as the overall rating of the department. Use the UML diagram below as a reference. Department() – accepts 5 ratings of the evaluators and determines the groupScore which is the total rating of the group. getGroupAverage() – returns the value of groupAverage which is the average score of the group. displayAverage() – displays the overAllAverage which is the average of the whole department. overAllScore is the over all score of the department. Department Group Score: Int Group Average : Double Overall Score: int overall Average: double Department()…arrow_forwardUsing Stucture in C programming language create a program with a user-defined function that asks for name and age of 5 person and display all inputs in ascending order according to age. Sample Output: Enter name of Person [1]: Juan Age: 22 Enter name of Person [2]: Anton Age: 23 Enter name of Person [3]: Bullet Age: 18 Enter name of Person [4]: Craig Age: 19 Enter name of Person [5]: Mario Age: 20 Name: Age: Bullet 18 Craig 19 Mario 20 Juan 22 Anton 23arrow_forwardcomputer programming (C) languagearrow_forward
- This function determines the winner of a round of the game according to the following rules: •Rock (1) breaks Scissors (3) (winner Rock) •Paper (2) covers Rock (1) (winner Paper) •Scissors (3) cuts Paper (2) (winner Scissors) •If both players make the same choice, the round is a draw. The function takes two input parameters: the computer's choice and the player's choice. The function determines the winner, displays winner of the round, and returns the winner as a string ('computer', 'player', 'draw') The function takes two parameters, the (integer) choice of the computer and the player. It determines who won the round (or if the round is a draw) and outputs an appropriate message. It also returns the winner as a string value. There are no new concepts in this function, however, makesure your selection statement covers all the possible combinations. Provide a pseudocode altorithm for this function Pythonarrow_forwardThe Café Noir Coffee Shop wants some market research on its customers. When a customer places an order, a clerk asks for the customer’s zip code and age. The clerk enters that data as well as the number of items the customer orders. The program operates continuously until the clerk enters a 0 for zip code at the end of the day. When the clerk enters an invalid zip code (more than 5 digits) or an invalid age (defined as less than 10 or more than 110), the program reprompts the clerk continuously. When the clerk enters fewer than 1 or more than 12 items, the program reprompts the clerk two more times. If the clerk enters a high value on the third attempt, the program accepts the high value, but if the clerk enters a negative value onthe third attempt, an error message is displayed and the order is not counted. At the end of the program, display a count of the number of items ordered by customers from the same zip code as the coffee shop (54984), and a count from other zip codes. Also…arrow_forwardThis function determines the winner of the match based on the score totals for all the rounds. The input to this function is the computer's final score and the player's final score. This function examines the scores and displays the winner as follows: •Player score is higher than computer score, message is "Player wins!" •Computer score is higher than player score, message is "Computer wins!"• Player score the same as computer score, message is "No winner, it's a draw!" The function takes two integer parameters, evaluates them and outputs an appropriate message. This is a void function. PYTHONarrow_forward
- (Data processing) Your professor has asked you to write a C++ program that determines grades at the end of the semester. For each student, identified by an integer number between 1 and 60, four exam grades must be kept, and two final grade averages must be computed. The first grade average is simply the average of all four grades. The second grade average is computed by weighting the four grades as follows: The first grade gets a weight of 0.2, the second grade gets a weight of 0.3, the third grade gets a weight of 0.3, and the fourth grade gets a weight of 0.2. That is, the final grade is computed as follows: 0.2grade1+0.3grade2+0.3grade3+0.2grade4 Using this information, construct a 60-by-7 two-dimensional array, in which the first column is used for the student number, the next four columns for the grades, and the last two columns for the computed final grades. The program’s output should be a display of the data in the completed array. For testing purposes, the professor has provided the following data:arrow_forwardWhen you borrow money to buy a house, a car, or for some other purpose, you repay the loan by making periodic payments over a certain period of time. Of course, the lending company will charge interest on the loan. Every periodic payment consists of the interest on the loan and the payment toward the principal amount. To be specific, suppose that you borrow $1,000 at an interest rate of 7.2% per year and the payments are monthly. Suppose that your monthly payment is $25. Now, the interest is 7.2% per year and the payments are monthly, so the interest rate per month is 7.2/12 = 0.6%. The first months interest on $1,000 is 1000 0.006 = 6. Because the payment is $25 and the interest for the first month is $6, the payment toward the principal amount is 25 6 = 19. This means after making the first payment, the loan amount is 1,000 19 = 981. For the second payment, the interest is calculated on $981. So the interest for the second month is 981 0.006 = 5.886, that is, approximately $5.89. This implies that the payment toward the principal is 25 5.89 = 19.11 and the remaining balance after the second payment is 981 19.11 = 961.89. This process is repeated until the loan is paid. Write a program that accepts as input the loan amount, the interest rate per year, and the monthly payment. (Enter the interest rate as a percentage. For example, if the interest rate is 7.2% per year, then enter 7.2.) The program then outputs the number of months it would take to repay the loan. (Note that if the monthly payment is less than the first months interest, then after each payment, the loan amount will increase. In this case, the program must warn the borrower that the monthly payment is too low, and with this monthly payment, the loan amount could not be repaid.)arrow_forward(Civil eng.) Write a C++ program to calculate and display the maximum bending moment, M, of a beam that’s supported on both ends (see Figure 3.8). The formula is M=XW(LX)/L, where X is the distance from the end of the beam that a weight, W, is placed, and L is the beam’s length. You program should produce this display: The maximum bending moment is xxxx.xxxx The xxxx.xxxx denotes placing the calculated value in a field wide enough for four places to the right and left of the decimal point. For your program, assign the values1.2,1.3,and11.2toX,W,andL.arrow_forward
- (Civil eng.) Write an assignment statement to calculate the linear expansion in a steel beam as a function of temperature increase. The formula for linear expansion, l, is as follows: l=l0(1+(TfT0)) l0isthelengthofthebeamattemperatureT0.isthecoefficientoflinearexpansion.Tfisthefinaltemperatureofthebeam.arrow_forwardI need help on this?arrow_forwardQUESTION 2 An event for a company is designed to bring customers from Kuala Lumpur to a gathering in Kota Bharu, Kelantan. The distance between Kuala Lumpur and Kota Bharu is 450 km. The cost of traveling depends on the type of car chosen by the customer, as shown in Table 1. Write a program that requests the car preference of the customers. Then the program calculates the cost of travelling based on the following formula: Cost = Price per liter/KM per liter × Distance travel The current prices per liter are RM2.05 and RM1.50 for gasoline and diesel, respectively. The liter per KM for each car is provided in Table 1. Table 1 Car Fuel type KM per liter Мyvi Gasoline 25 Perdana Gasoline 19 Triton Diesel 10 Ranger Diesel 15 Ria Gasoline 16 Sample output: Please enter your car type: Triton You choose Triton that uses diesel fuel. The cost is RM120. Please pay RM120 to the front office. Thank you.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrC++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningProgramming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:Cengage
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Structured Chart; Author: Tutorials Point (India) Ltd.;https://www.youtube.com/watch?v=vdUO-sGA1DA;License: Standard YouTube License, CC-BY
Introduction to Structure Charts; Author: Christopher Kalodikis;https://www.youtube.com/watch?v=QN2bjNplGlQ;License: Standard Youtube License