Write a program that can be used to compute the average exam grade for multiple students. Each student has the same number of exam grades.
Q: Write a program that accepts a date in the form month/day/year and out- puts whether or not the date…
A: Algorithm: Check if the month, day, and year can be converted to ints Check if values are in…
Q: Write a program that reads a floating point number and prints "zero" if the number is zero.…
A: Please find the answer below :
Q: write a program that displays, in ascending order,the first names of those students who have…
A: Step 1:- In the question does not show in which language write the program therefor above program…
Q: Write a program that will compute for the salesman's commission based from his total sales for the…
A: As no programming language is mentioned, it is solved using basic C++
Q: Write a program that will check and print if the person is a regular passenger, student or senior…
A: Program Code: #include<stdio.h>#include<conio.h>main(){ int ch,fare; printf("If you are…
Q: Write a program that finds five prime numbers largerthan Long.MAX_VALUE.
A: Program: //import math package for mathematical operations import java.math.*; public class Main {…
Q: Write a program that generates 50 random numbers such that the first number is between 1 and 2, the…
A: ## As no language is mentioned, the code is written in Python. import random # for loop runs…
Q: Write a program that simulates the way the calculator -) works when the user enters two variables…
A: Solution Program Approach SIMPLE CALCULATOR program This program is used to simulate a…
Q: write a program in VB that requires from user to insert the total number of students and the number…
A: ' Program that reads total student and successful student and calculate' and display percentage of…
Q: Write a program to find the equivalent series and parallel resistance for 3 resistor values. Your…
A: As there is no programming language mentioned in question . program is attempted in c language user…
Q: Write a program that shows that the square of the normal is χ2
A: Given To know about the programming and program of square of number.
Q: Write a program that prompts the user to enter the students’ names and their scores on one line, and…
A: Output:
Q: write a program in python that asks for the number of credits you have earned to date (may be zero…
A: # Input the taken credit credit = int(input('Enter the number of credits you have earned to date :…
Q: Write a program to read X and print Sin X if X>0, square root X f X<0 and absolute X if X/2 is…
A: PROGRAM CODE: #include <iostream>using namespace std;#include <conio.h>#include…
Q: Write a program which reads two integers and prints out the sum, the difference and the product.…
A:
Q: Write a program that takes a positive integer x greater than zero typed in by the user, and prints…
A: #include <stdio.h> int main() { //declaring variable int x,i; //take input from…
Q: Write a program that examines three variables - p, q, and r - and prints the smallest even number…
A: As per our guidelines we are suppose to answer only first question. Kindly repost other questions…
Q: Write a program that takes the input of the number of rows and then prints the diamond for the given…
A: Program Approach: Define method diamond and pass row as an argument in it. Variable a is declared…
Q: Write a program that reads the value of x and y, then if x is bigger than or equal y calculate and…
A: Math functions used in the program Math.pow() Math.cos The program first inputs the value of x and…
Q: Write a program that will determine how many coins of each denomination (50kr, 25kr, 10kr, Skr, and…
A: I'm using C++ to code following given question:
Q: Write a program that takes the x, y coordinates of a point in the Cartesian plane and prints…
A: Note: You didn't mention any languages so i use C language//include the header…
Q: write a program that read an excel sheet that contains some animals' information. The information…
A: Below is the Python program for:- write a program that read an excel sheet that contains some…
Q: Write a Python program to read the salary for N employees. Your program should find and print :…
A: Given: Write a Python program to read the salary for N employees. Your program should find and print…
Q: Write a program that plays a guessing game with the user. Have your program read and store an…
A: Input a number and then generate a random number The number should be from 1 to 10 So, applying %10…
Q: Write a program that will count the number of votes for each candidate, show the total number of…
A: Use an array to store the votes for each candidate and keep on voting till user wish to quit
Q: • Write a program that computes the average of 5 students grades which are entered by the user.
A: According to the guidelines we are supposed to answer only 1 question. So I am solving the first…
Q: Write a program that reads text from the user and reverses the order of every number that appears in…
A: Solution:-- 1)The given question has required for the solution to be provided with the help of the…
Q: Write a python program that asks the user how many credits they have taken. If they have taken 23 or…
A: Python program Prompt the user to enter the credits they have taken. Store the user entered…
Q: Write a program that reads an integer age of kids, finds the maximum of them, and counts its…
A: #include <iostream> using namespace std; int main(){ int…
Q: Write a program that reads the price and the production date(month and year of an item) then prints…
A: % read price and production price = input('Enter price'); production_month = input('Enter production…
Q: Write a program that prints student's name and grade point average in 6 subjects a
A: C++ programming language has been used. C++ code is as follows: #include<iostream>using…
Q: Write a program that reads an unspecified number of scores anddetermines how many scores are above…
A: Since you are not mentioning the programming language, here we are using Java to complete the…
Q: Write a program that calculates the total grade for N classroom exercises as a percentage. The user…
A: Program: //include the header file #include<iostream> #include<iomanip> using namespace…
Q: Write a program that reads a number in feet, converts it to meters, and displays the result. One…
A: PROGRAM CODE: import java.util.Scanner; public class Main { public static void main(String[] args) {…
Q: Implement a program that requests four numbers from the user. Your program should compute the…
A: Programming language is missing in the question. So we will answer this program in Python language.…
Q: Write a python program which takes marks of 5 subjects for 3 students using loop (for/while) and…
A: Introduction of Program: In this Python program, the User enters the 5 subjects marks of 3 different…
Q: Write a program that reads the 10 student grades () from keyboard and calculates the class average.
A: Code in python programming language #Program to read grades of 10 students from teh keyboard and…
Q: Write a program that asks the number of students and then asks to enter the student's mark and then…
A: As the programming language is not mentioned, we are using PYTHON here The code and output…
Q: Write a program that reads an integer and displays all its smallest factors in an increasing order.…
A: Since the program language not specified the program has been developed using Java to satisfy the…
Q: Write a program that inputs a number and checks whether it is a perfect number or not. A perfect…
A: PERFECT NUMBERS A perfect number is a number that is equal to the sum of its proper divisors.…
Q: Write a program to find two points that are nearest to each other. For example, points (1, 1) and…
A: I have added the comments. I have also added the screenshot. The class name is Test. So the commands…
Q: Write a program that takes in an integer in the range 11-100 as input. The output is a countdown…
A: Program Explanation: Import the class for scanner Define a class for countdown Declare and define…
Step by step
Solved in 2 steps with 1 images
- f. A laborant in a laboratory does a number of antigen tests in one day. Write a program that simulates the number of antigen tests done in a day in a laboratory, displays the number of positives and negatives, and calculates the % of positives in one day. Your program needs to first generate a random number that will show the number of tests done in a day. One laboratory in a day cannot do more than 100 tests and less than 1 (they do at least one). Then for each of the tests, your program needs to generate a random number to show whether they are positive or negative. In order to write this program, you need to have the following three functions used by the main function: test result (void): This function generates a test result. It should randomly return either one or zero. 1 means positive test result and 0 means negative test result. float positive percentage (int,int) : This function takes the total number of positives and the total number of tests and returns the % of positives.…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…Write a program that reads in three integers and then determines and prints the largest and the smallest integers in the group. Use only the programming techniques you have learned in this chapter.
- Write a program that will check the employees years in service and office. • The user will input number for years and in service and the following offices(IT, ACCT, HR)The monthly payment for a givenloan pays the principal and the interest. The monthly interest is computed by multiplyingthe monthly interest rate and the balance (the remaining principal). The principalpaid for the month is therefore the monthly payment minus the monthly interest.Write a program that lets the user enter the loan amount, number of years, and interestrate then displays the amortization schedule for the loan. Here is a sample run: Loan Amount: 10000 ↵EnterNumber of Years: 1 ↵EnterAnnual Interest Rate: 7 ↵EnterMonthly Payment: 865.26Total Payment: 10383.21Payment# Interest Principal Balance1 58.33 806.93 9193.072 53.62 811.64 8381.43...11 10.00 855.26 860.2712 5.01 860.25 0.01Write a program that lets the user guess whether a randomly generated integer would be even or odd. The program randomly generates an inte- ger and divides it by 2. The integer is even if the remainder is 0, otherwise odd. The program prompts the user to enter a guess and reports whether the guess is correct or incorrect.
- C++ One way to create a pseudo-random three digit number (and we are including one- and two-digit numbers as well) is rand()%1000. That gives numbers from 000 to 999, which is just what we want. Write a program that generates a random number and asks the user to guess what the number is. If the user's guess is too high then the program should display "Too high, try again." If the user's guess is lower than the random number the program should say "Too low, try again." The program should use a loop that repeats until the user correctly guesses the random number. The program should keep track of the number of guesses the user makes. When the user correctly guesses the random number, the program should display the number of guesses. As specified, have the program tell the player how many guesses were used. A good player should always be able to find a three-digit number in ten or fewer guesses. The programs needs to include a menu that allows the user to select easy (3 digit number),…Write a program that helps a company manage salaries of its employees. Your program should ask for the number of hours worked and the hourly rate of an employee than, display the salary. This program should allow the user to enter the information of many employees until enters -1. Sample Run: Enter the number of hours worked (-1 to end): 32 Enter hourly rate of the worker: 100 Balary is 03200 Enter the number of hours Worked (-1 to end) : 40 Enter hourly rate of the worker: 5 Balary is 3200 Enter the number of hours worked (-1 to end): 42 Enter hourly rate of the worker: 10 Salary is 0420 Enter the number of hours worked (-1 to end) : -1In this assignment you will write a program that shows the valid moves of chess pieces. Your program will draw a board with 64 squares using the traditional layout, next ask the user to choose a move, and then, depending on the user's choice, redraw the board with the selected chess piece and its valid moves. Please see the examples of valid moves of chess pieces and the traditional chess board layout below:
- Write a program that computes and displays the charges for a patient’s hospital stay. First, the program should ask if the patient was admitted as an in-patient or an out-patient. If the patient was an in-patient the following data should be entered: • The number of days spent in the hospital• The daily rate• Charges for hospital services (lab tests, etc.)• Hospital medication charges.If the patient was an out-patient the following data should be entered:• Charges for hospital services (lab tests, etc.)• Hospital medication charges.Use a single, separate function to validate that no input is less than zero. If it is, it should be re-entered before being returned.Once the required data has been input and validated, the program should use two overloaded functions to calculate the total charges. One of the functions should accept arguments for the in-patient data, while the other function accepts arguments for out- patient data. Both functions should return the total charges.The equation of a straight line is written as y = mx + b where m is the slope of the line and b is the value of y when x = 0. If there are two coordinate points of the line are given, then it is very easy to compute the line equation. Also you can find the distance between two points. Problem: Write a program to compute lines equation for a set of lines. The number of lines is read from the user. Each line is computed by generating two points randomly using Point2D API. In addition, distance between two points is computed. The program should display a table which include all information about each line. See sample runs below. Take into consideration: 1. Number of generated lines should be greater than zero. 2. Two point objects are constructed only once. Then just update the location of two points for each line using Point2D API methods. 3. x and y values of each point are generated randomly to be less than 100 and greater than 0. 4. Compute the distance between two points using…Find the numbers that can be expressed as the product of two nonnegative integers insuccession and print them in increasing order. (For example, 30 is such a number as it can bewritten as the product of 5 and 6 (30=5x6), which are two numbers in succession.) The user shouldspecify a maximum value and the program should print all said numbers smaller than or equal tothat value. The program should keep a count of how many numbers were printed and should output that count ,as well as the numbers