The program below computes the maximum exam mark for multiple students. The user enter student name and the marks of three exams. The program stops for student name with empty input
Q: Two cars A and B leave an intersection at the same time. Car A travels west at an average speed of x…
A: Program code: //include the required header files#include <iostream>#include…
Q: Write a program that takes the distance of the commute in kilometers, the car fuel consumption rate…
A: function main: Start declare kms, fuel, petrol read kms read fuel read petrol cost_of_commune =…
Q: Write a program to input for a number, if the number is palindrome, then display its half on the…
A: Note: In this question, the coding language is not specified then we are doing this question in the…
Q: Q1) Write a program to test the degrees of 100 students, If the student's degree is a floating. it…
A: C++ Code for above : #include <bits/stdc++.h> using namespace std; int main() {…
Q: Ask the user for a name and for a list of test scores. Show the number of tests taken and the…
A: import java.util.ArrayList;import java.util.List;import java.util.Scanner;public class Main {…
Q: 4)Write program that input the user age and print the sentence: a) You are child if the age is less…
A: There is not mentioned any programming language so I used JAVA Step 1 : Declare a variable age and…
Q: Write a program to input 5 numbers from keyboard and find their sum and average. The program should…
A: Code: #include <iostream> using namespace std; int main(){ while(true){…
Q: This is a segment of program, when it executed with multiple values for n and s the program displays…
A: Given code: #include <iostream> using namespace std; int main(){ int x, y; int f;…
Q: A program is required by a company to read an employee‘s number, pay rate and the number of hours…
A: Validation Process: Assume that the company follows below rules, The maximum number of hours an…
Q: Write a program that asks user to enter a number until user enters -1. Then the program should…
A: Since you have not mentioned programming language I'm doing this in c++.
Q: QUESTION#5: Write a program that inputs a sequence of non-negative numbers terminated by a negative…
A: Declare an array to store the given input Append the negative number at the end of each list Compute…
Q: Create a program that asks the user for any number. Then rounds off the number into its nearest…
A: The code implementation in C++ is given below. The Algorithm: The user is prompted to enter a…
Q: v. Write a program that inputs the age of different persons and counts the number of persons in the…
A: Code : #include<stdio.h> #include<conio.h> void main() { int i,n,age[100],count=0;…
Q: Question 1 Write a program that finds the new salary of an employee after several years of work…
A: Note: Programming language not mentioned in the question. C++ is chosen for implementation.…
Q: Write a program that prompts the user to enter three integers and display the integers in…
A: Given:
Q: Write a program that asks the user to enter a float number and evaluate the function f(x) as…
A: x=float(input("Enter value of x :")) if(x<=0): f_x=-1*x elif(x<1 and x>0): f_x=x*x else:…
Q: Modify the above program to compute the side area, total area, and volume of a cylinder and the area…
A: GIVEN: Modify the above program to compute the side area, total area, and volume of a cylinder and…
Q: Write a program that prompts the user to enter Expo2020 pass (Season, Multi-day, or One-day), adult…
A: ## As no language is mentioned, the code is written in Python. passName = input("Enter…
Q: Write a program that determine the age based on code as input. A: Veteran (age above 50) B: Adult…
A: As the language of code is not specified. So, I had answered this question in Java language. Hope…
Q: Write a program that reads an unspecified number of scores (1 - 99) and displays the following…
A: NOTE: Programming language is not mentioned, so doing in C++ In this question, we are asked to write…
Q: Write a program that asks the user for a number, and multiplies it by 3 then prints out the result:…
A: Start Prompt the user for input Parse it as integer Multiply the number by 3 Print the result Stop
Q: for the above program, Write down the question / Se (Write the series up to 3 times as written in…
A: Based on operators precedence, division has higher precedence than addition Thus, i/i gets…
Q: program so that the user enters the rate of tuition increase for the first year. the rate then…
A: C++ used to answer this question
Q: PROBLEM: Write a program that prompts the user to input three (3) integers: MM, DD, and YYYY. For…
A: #include <iostream>using namespace std;// to check if year is leap year or notbool isLeap(int…
Q: Write a program that asks the user to input three numbers and calculates their maximum
A: Required: A program to ask the user three numbers and print the maximum. Required code with…
Q: Write a program that reads in loan amount, annual interest rate and number of years for the loan and…
A: Actually, program is an executable software that runs on a computer.
Q: Write a program that prompts the user to input three numbers. The program should then output the…
A: #include<iostream> #include<algorithm> using namespace std; int main(){ cout…
Q: Write a program that will ask the user to input three integer values from the keyboard. Then it will…
A: #include <iostream>#include <conio.h>using namespace std;int maxval(int, int,int);int…
Q: Write a program that asks the user to enter the number of students, then enter the grades of these…
A: I have provided C++ CODE along with CODE SCREENSHOT and 2 OUTPUT SCREENSHOTS------------
Q: The average cost of a college textbook is $125. There is a premium of 20% on hardcover text and a…
A: conditions :- In case of hardcover text if n>4 total=n*avg_cost+ (premium*(n*avg_cost)/100)…
Q: Write a program that prompts the user to input three numbers. The program should then output the…
A: Java program to display the three number in ascending order. Create the object of the Scanner class…
Q: Write a program that prompts the user to enter Expo2020 pass (Season, Multi-day, or One-day), adult…
A: The C++ code along with the snapshot of code and output.
Q: Write a program that reads from the user the product unit price, tax percentage to be applied on the…
A: Given: write the program using java
Q: Take two integers as input from the user. Print all odd numbers that fall within the range of those…
A: The idea behind the solution is - We will take 2 integers n and m. Use the condition, divide the…
Q: Write a program to calculate the net pay of an employee. Input the basic pay and calculate the net…
A: class EmployeeSalary: hraPay = 0 conveyancePay = 0 medicalAllPay = 0 netPay = 0 def…
Q: A person is eligible to be a US senator if they are at least 30 years old and have been a US citizen…
A: PROGRAM EXPLANATION Take personage and years of citizenship as input from the user. Now, using the…
Q: Write a program to calculate and display the average, the lowest and the highest marks of a class of…
A: Q: Code the given problem
Q: Write a program that prompts the user to enter the numberof students and each student’s name and…
A: Program: import java.util.*; public class Main { static void LowestScores(String name[], float…
Q: Write a program that prompts the user to enter an integer and determines whether it is divisible by…
A: Since there is no programming language, below is the program in python.
Q: Write a program that inputs the hourly rate and number of hours worked. Compute and display the…
A: Here I have taken input from the user and then stored it into 2 different variables. Next, I have…
Q: Write a program to check whether a entered number is perfect number or not.
A: Below is a required C++ code.Program Approach: Include a necessary header file and use the…
Q: Q1: Write a program that input four grades for six students and output a. The grades summation for…
A: #include<iostream.h>#include<conio.h> #include<dos.h> void main ( ) {…
Q: Write a program will then ask for the prelim grade, midterm grade and final grade of the student.…
A: The program is written in python.find the program in below steps.
Q: write a program that enters the names of ten countries, then for each
A: code for v = 1:1:10 prompt = 'Enter the name of '; country = input(prompt, 's')…
Q: Write a program that asks user to enter two numbers. Then the program should print the even numbers…
A: Task : Write a program to print even numbers between two numbers. C++ program :- #include…
Q: write a program is to calculate and display the volume of cone with given the value for the diameter…
A: Following variables are used in the program:diameter, radius. height, volume: To store the diameter,…
Q: Write a program that computers and assess the tuition fee of the students in one trimester, based on…
A: Program Explanation- Enter the tuition fee. Print choice menu. Switch between the choices. Fee…
Q: readers. Write a program with two inputs, current price and last month's price (both integers output…
A: Implement this system is given below: 1)Declare variables 3)examine current_price and…
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
- Exercise II Write a program that finds the positive integer solutions of the following equation ax³ + bx² + cx' + d = 0. The user enters the values of coefficients a, b, c and d. The program should test each integer starting from -50 to 50, and each time the equation is equal to zero, it prints its value as well as "is a solution". At the end, it displays the total number of positive integers found. Note that if the equation has more than one solution, the plural word “solutions" is used in the output. Sample run 1: Enter the coefficient of a, b, c, d: 1 -8.5 21 -13.5 1 is a solution 3 is a solution The equation has 2 integers as solutions Sample run 2: Enter the coefficient of a, b, c, d: 6 48 103.5 67.5 The equation has no integer solutions Sample run 3: Enter the coefficient of a, b, c, d: 1 -1 -12 0 4 is a solution The equation has 1 integer solutionA function declared int addition (int a and b) is capable of returning one value back to the main loop. True False(Misc. application) a. Write a program that continuously requests a grade to be entered. If the grade is less than 0 or greater than 100, your program should print an appropriate message informing the user that an invalid grade has been entered; else, the grade should be added to a total. When a grade of 999 is entered, the program should exit the repetition loop and compute and display the average of the valid grades entered. b. Run the program written in Exercise 2a and verify the program by using appropriate test data.
- 4. During each summer, John and Jessica grow vegetables in their backyard and buy seeds and fertilizer from a local nursery. The nursery carries different types of vegetable fertilizers in various bag sizes. When buying a particular fertilizer, they want to know the price of the fertilizer per pound and the cost of fertilizing per square foot. The following program prompts the user to enter the size of the fertilizer bag, in pounds, the cost of the bag, and the area, in square feet, that can be covered by the bag. The program should output the desired result. However, the program contains logic errors. Find and correct the logic errors so that the program works properly. // Logic errors. #include #include using namespace std; int main() { double costs double area; double bagsize; cout > bagsize; cout > cost; cout > area; cout << endl; cout << "The cost of the fertilizer per pound is: $" << bagsize / cost << endl; cout << "The cost of fertilizing per square foot is: $" << area / cost << endl; return 0; }0199% 10:00 docs.google.com/forms 13 last constant Problem 1 At a certain university, students have to submit their exams online. The administration decides that for each minute of late submission, 5 points are deducted. Write a program that asks the user for his initial grade and how long he delayed in submitting, and then displays the final result. Sample Run 1: Enter your initial grade: 82 Enter the late submission time (in minutes) : 6 Your final grade is 52 Sample Run 2: Enter your initial grade: 115 Grades should be between 0 and 100 Sample Run 3: Enter your initial grade: 43 Enter the late submission time (in minutes): 10 Your final grade is 0 Sample Run 4: Enter your initial grade: 72 Enter the late submission time (in minutes) : -2 Time should be positive Your answer Problem 2 Write a Java program integers day. month, and vear. You are NOT required to check if the values entered by the user are in give the user the ability to determine the day of a given date. The user shall…Assignment Write a program that tracks how much steps the user walks in total in a day and reports if the daily target is reached or not. The program will keep reading double values, each representing steps walked during an individual activity within a day (stepsWalked) until either the user enters a negative value or the daily target of 5000 steps is met. If the user enters a negative number, the program should print total steps walked as a double. Otherwise, if the target is exactly reached, the program should simply print "Target is reached", finally if the target is surpassed the program should print the text "Target is surpassed by", followed by the excess amount above the target as a double, and finally printing the text "steps". NOTE: You MUST use a repetitive statement in this question. NOTE: Each stepsWalked value will be given as a non-negative value. You do NOT need to check this. Input Output Answer assignment 3000 1300 500 2305.2 Target is surpassed by 2105.2 steps 450…
- Instructions The program in the Programming Example: Fibonacci Number does not check: Whether the first number entered by the user is less than or equal to the second number and whether both the numbers are nonnegative. Whether the user entered a valid value for the position of the desired number in the Fibonacci sequence. Rewrite that program so that it checks for these things. NOTES: If an invalid number is entered for case 1 above, prompt the user to enter both numbers again. If an invalid number is entered for case 2, prompt the user to enter a value until a valid value is entered. the code: #include <iostream> using namespace std; int main() { //Declare variables int previous1; int previous2; int current; int counter; int nthFibonacci; cout << "Enter the first two Fibonacci numbers: "; //Step 1 cin >> previous1 >> previous2; //Step 2 cout << endl; //verify the first two values if(previous1<0 && previous2>0)…MATLAB QUESTION - As of 2018, the population of "A city" is 646 thousand and the population of "B city" is 269 thousand. While the population of "A city" decreases by 7.1% every year, the population of "B city" increases by 12.9%. According to this information, write a program that calculates the year in which the population of "B city" passed the population of "A city".Financial application: compute future apartment rent) Suppose that the rent for an apartment is $1000 thisyear and increases 3% every year. Write a program that computes the rent in five years and the total rent forone year starting five years from now.
- PART3: critical exam Q1: Write A Program To Print The Multipliers Of 6 From 12 To 60, Using Do While.Display the following CALCULATION OF VOLUMES[CHOICE] [SHAPE]1 Cuboid2 Sphere3 Cylinder4 Exit b. The user has to input the choice. Display the appropriate message when the user enters invalid input.c. Based on the choice entered, get the data required from the user and display the volume of the shape chosen.d. The program will loop again start from step 1. The process will only stop when the user enters choice 4 (The program will remain to loop if the enter choice is not 4).e. After the program exit from the loop, display the total_volume and average for all the shapes that has been calculated in the program.f. End the program by giving a closing message to the user.PROBLEM: Write a program that prompts the user to input first name, middle initial, and last name (in upper case) for an ID card. There is a 22-character limit that also includes spaces in between the names on the ID card. The following conditions/limitations are observed: A. If the first name, second name, middle initial, and last name exceed the character limit, use the first name initial and last name. B. If the last name's character count is greater than or equal to the character limit, omit the second name and middle initial. Use the first name initial and truncate the last name to fit the character limit. C. The spaces in between the first name, second name, middle initial, and last name should not be included in the input. D. If there is no second name or middle initial, input 0. E. Omit any space in the last name, e.g., DE GUZMAN will be DEGUZMAN. SPECIFICATIONS: - You may only use the codes that we studied under our lectures - All lines of codes should have a comment. - Save…