Write pseudocode for a program that reads a student record, consisting of the student’s first and last name, followed by a sequence of test scores and a sentinel of −1. The program should print the student’s average score. Then provide a trace table for this sample input:
Harry Morgan 94 71 86 95 -1
Trending nowThis is a popular solution!
Chapter 4 Solutions
Big Java Late Objects
Additional Engineering Textbook Solutions
Objects First with Java: A Practical Introduction Using BlueJ (6th Edition)
Starting Out with C++ from Control Structures to Objects (9th Edition)
Concepts Of Programming Languages
Starting Out with Java: From Control Structures through Data Structures (4th Edition) (What's New in Computer Science)
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
Computer Science: An Overview (12th Edition)
- Your relative, who goes to primary school and has just learned the multiplication table, asks you to constantly ask him. You wanted to gamify it. The computer will randomly scan in the multiplication table and the user will write the answer on the screen. There will be 10 questions in total and at the end the number of questions, the number of correct answers and the number of wrong answers will be printed on the screen. Also, write a program that will print if the percentage of success is below 80, it remained, and if it was above, it passed. (On C# ConsoleApp(.Net Framework)arrow_forwardA factorial of N is defined as 1 if N is 0 or 1, and 1*2**N if N is a non-negative integer. Write a program that would accept a value for N and would compute and display its factorial. For example: Input Result 1 5. 120 1,arrow_forwardDesign the logic (flowchart and/or pseudocode) using arrays for a program. It asks a user to enter a product number, then searches through an existing list of product numbers, for each one of which a recall has been issued recently. Based on the search result, a message will be displayed to the user (e.g., "A recall has been issued for this product." or "No recall found for this product."). Here is the existing list of product numbers: 100, 103, 108, 110, and 125. PreviousNextarrow_forward
- Transient PopulationPopulations are affected by the birth and death rate, as well as the number of people who move in and out each year. The birth rate is the percentage increase of the population due to births and the death rate is the percentage decrease of the population due to deaths. Write a program that displays the size of a population for any number of years. The program should ask for the following data: The starting size of a population P The annual birth rate (as a percentage of the population expressed as a fraction in decimal form)B The annual death rate (as a percentage of the population expressed as a fraction in decimal form)D The average annual number of people who have arrived A The average annual number of people who have moved away M The number of years to display nYears Write a function that calculates the size of the population after a year. To calculate the new population after one year, this function should use the formulaN = P + BP - DP + A - Mwhere N is the…arrow_forwardStatistics are often calculated with varying amounts of input data. Write a program that takes any number of non-negative integers as input, and outputs the average (using integer division) and max. A negative integer ends the input and is not included in the statistics. Ex: When the input is: 15 20 0 5 -1 the output is: 10 20 Assume that at least one non-negative integer is input.arrow_forward/*code Kth Largest Factor A positive integer d is said to be a factor of another positive integer N if when N is divided by d, the remainder obtained is zero. For example, for number 12, there are 6 factors 1, 2, 3, 4, 6, 12. Every positive integer k has at least two factors, 1 and the number k itself.Given two positive integers N and k, write a program to print the kth largest factor of N. Input Format: The input is a comma-separated list of positive integer pairs (N, k). Output Format: The kth highest factor of N. If N does not have k factors, the output should be 1. Constraints: 1<N<10000000000 1<k<600. You can assume that N will have no prime factors which are larger than 13..arrow_forward
- User inputs real numbers until an exit code is entered. The program computes and prints the mean, median, mode, and standard deviation of the data set. The population standard deviation is the square root of the variance. The variance is the sum of the squared deviations away from the mean (entered number - mean)^2 all divided by n, the size of the data set.arrow_forwardYour relative, who goes to primary school and has just learned the multiplication table, asks you to constantly ask him. You wanted to gamify it. The computer will randomly scan in the multiplication table and the user will write the answer on the screen. There will be 10 questions in total and at the end the number of questions, the number of correct answers and the number of wrong answers will be printed on the screen. Also write a program that will print if the percentage of success is below 80, it remained and if it is above it, it passed.arrow_forwardE Apps M Gmail YouTube Maps HCL Term3 AssesSIment- PROG JAS21 CCH4 1-19/10/2021 Alphabet Pattern 1 Write a program to print the given pattern. Input and Output Format: Input consists of a single integer that corresponds to the number of rows,n. The output is the alphabet pattern for the given input,n. Sample Input 1: Sample Output 1: A AB АВС АВCD ABCDE Sample Input 2: Sample Output 2: A АВ АВС АВCD ABCDE ABCDEF 11 hcl.e-box.co.im ABCDEFG O Type here to searcharrow_forward
- Some students have organized an election to determine the new leaders of their school club. Each member of the club has a unique ID that they can use when they vote. However, the election managers suspect that some members have voted twice. Write a program to read in member IDs and check if there are any repeated values. If an ID has already been used, output a line in this format: REPEAT: The ID BE45N6 has already been counted! Stop reading input after reading the value "STOP". Then output a line showing how many unique members voted in this format: After excluding repeats, 45 unique members voted. p5.cpp O O New I Full Screen #include using namespace std; 4 5 int main() { 7 // TODO: Write your code here cout "REPEAT: The ID " <« "AAOOAO" << " has already been counted!" <« endl; 10 cout « "After excluding repeats, e « " unique members voted." endl; 11 12 13arrow_forwardThe course grades of 75 students from 5 courses are given in the form of a table. Write an algorithm that writes "cannot be entered" for those with an average of less than 40 course grades, and "can be entered" for 40 and above. (Please explain everything the program in details and please check whether the program runs or not by using q-basic64. 01:44arrow_forwardWrite a program that calculates the equivalent resistance of a circuit. n electrical resistors with resistance values R1, R2,.., Rn are said to be connected in parallel if the same voltage is applied across each. Their equivalent resistance Reg is related to the values R1, R2, ..., Rn by: 1 1 1 1 + +...+ R R R, R. "eq Write a program that prompts the user to enter the resistance of n resistors. The user should be prompted continuously by using a while loop until a zero or negative value is entered (the program should count the number of resistors n entered by the user and store the values in an array). Use another separate loop to print the resistance values entered by the user and the equivalent resistance Reg. Test your program with R1= 1 kn, R2= 2 kn, R3= 4 kQ and R4= 8 kQ.arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education