Write a program that prompts the user to enter the number of students and each student's name and score, and finally displays the student with the highest score and the student with the second-highest Score. Assume that the number of students is at least 2. Sample Run Enter the number of students: 5 Enter a student name: Smith Enter a student score: 60 Enter a student name: Jones Enter a student score: 96 Enter a student name: Peterson Enter a student score: 85 Enter a student name: Greenlaw Enter a student score: 98 Enter a student name: Zhang Enter a student score: 95 Top two students:
Q: Write a program that generates two integers under 100 and prompts the user to enter the sum of these…
A: Explanation All that remains is to import the random library. randint() is a built-in function in…
Q: Write a program that prompts the user to enter an integer and prints the value of the following…
A: Below I have provided the Java code of the given Question. Also, I have attached the output of the…
Q: Write a program that prompts the user to input any digit then swap the position of the first and the…
A: #include <iostream>#include <string.h>using namespace std; int main(){ string number;…
Q: Write a program that reads the height h and radius r of Right Circular Cone and finds the surface…
A: As no programming language is mentioned, I am using python. In step 2, you will get the python code.…
Q: Write a program that will continually ask the user to enter a positive number from standard input…
A: Type casting is a feature to convert the type of variable from one datatype to another. There are…
Q: Write a program that prompts the user to enter an integer from 1 to 15 and displays a pyramid, as…
A: EXPLANATION - Create a program . In main function declare three variables that are p , q , r .…
Q: Write a program sequence.cc that prompts the user to enter the value of x, the pro- gram outputs the…
A: CODE:- #include <iostream>using namespace std; int main(){ char again; do{ //get…
Q: Write a program that generates a random number in the range of 1 through 100, and asks the user to…
A: ## As no language is mentioned here, we write the program in Python language. # importing…
Q: Write a program that prompts the user to enter the year and thefirst three letters of a month name…
A: Since, here no programming language is specified. So, we are providing the solution in Java. The…
Q: Write a program that prompts the user to enter an integer from1 to 15 and displays a pyramid, as…
A: NOTE: - Since, question lacks the name of the programming language. So, the pattern is implemented…
Q: Write a program that asks the user to enter 2 integers of 4 digits and displays the different digits…
A: Algorithm: Start Read 2 4 digit numbers Convert numbers to string s1,s2 Declare an empty string…
Q: Write a program that allows the user to enter the last names of a number of candidates in a local…
A: There is no programming language mentioned, so i have used C++ for program. Please check the step…
Q: Write a program that asks the user to enter two integer numbers X and Y. The program halves each…
A: code #include <iostream>using namespace std; int main(){ float x,y; int ctr=0;…
Q: Write a program that allows the user to enter the last names of five candidates in a local election…
A: You need to input the last names of five candidates in a local election and the number of votes…
Q: Write a program that take input a value x from user and print the value 2*x*sin2x
A: Note- Since programming language is not mentioned so I have used C programming language. To…
Q: Write a program that prompts the user to enter an integer anddisplays whether the integer is an odd…
A: Program code: //include the required packages #include <stdio.h> //define main function int…
Q: • Write a program that prompts the user to input an integer and then outputs the number with the…
A: Note: As you have not mentioned any programming language, I am writing the program in the JAVA…
Q: 2. Write a program to determine the price for a portrait sitting. The price is determined by…
A: Program to determine the price for a portrait sitting: #include <bits/stdc++.h> using…
Q: Write a program that prompt the user to enter 2 items, if the user purchases bread and butter he…
A: Solution: Java program: import java.util.*; public class Test { // Main method public…
Q: Write a program that prompts the user to enter the annual income (in int) of an employee. The…
A: 1)Start 2)read the income from the user 3)Based on the amount using if statement decide the slab of…
Q: Write a program that ask the user to enter two integers N and M then prints the summation of even…
A: You have not specified any programming language in the question. So, I have used C++ language to…
Q: Write a program that reads any 5 numbers as in the given sample of output below: Sample of…
A: Note: As no programming language is mentioned, using python. Get 5 input values from the user and…
Q: Write a program which repeatedly reads several people's height numbers in cm(centimeter) until the…
A: As no programming language is mentioned, it was implemented using simple Python
Q: Write a program that asks the user to enter the number of passengers in an airplane and the weight…
A: A number of passengers are provided by the user. Based on the number of passengers, the weights…
Q: Write a program that prompts the user to enter the month and first day of the month, and displays…
A: /*program that prompts the user to enter the month and first day of the month, and displays all the…
Q: Write a program that prompts the user to input an integer and then outputs both individual digits of…
A: Note: In this question, the coding language is not specified then we are doing this question in the…
Q: Write a program to prompt the user for their age. Based on their age print out which generation they…
A: If age>21 and age<36 You are generation millennials. Youth ends at 40, old age begins at 59.…
Q: Write a program that asks the user to enter an integer consisting of 4 digits only, and check how…
A: C programming language is used below to solve the given problem. Algorithm: Start Initialise the…
Q: Write a program that reads the width, height and a character from the user, then calculates the…
A: Code import java.util.Scanner;public class Main{ public static void main(String[] args) {…
Q: Write a program that inputs one five-digit number, separates the number into its individual digits…
A: //C++ program #include <iostream> using namespace std; int main(){ int n,a[5],i=4;…
Q: Write a program that converts pounds into kilograms. The program prompts the user to enter a number…
A: C++ Program: #include<iostream>using namespace std; // Function convertPtoK() to convert…
Q: |Write a program that prompts the user to enter the numerator and denominator of a fraction. The…
A: import java.util.*; public class fractioncheck {public static void main(String args[]) { Scanner…
Q: Write a program that Requests a temperature from the user. Also asks if the temperature is in…
A: Ans: python is very sensitive about indentation.So, please take care about indentation.Copy the same…
Q: Write a program that reads an integer between 1972 and 2001 (year of birth). Print the age group…
A: #include<iostream>using namespace std;int main(){ int x; cout<<"Enter the year of birth…
Q: Write a program that asks the user for his name and salutes him using it. The prompt must be "What…
A: Given:
Q: Write a program that prompts the user to enter aletter grade A, B, C, D, or F and displays its…
A: Program code: //import the required packages import java.util.Scanner; //define a class public…
Q: under 100 and prompts the user to enter the sum of these two integers. The program then reports true…
A: Here have to determine about program for sum of two numbers.
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: Write a program that prompts the user to enter the currency exchange rate between U.S. dollars and…
A: GIVEN: Write a program that prompts the user to enter the currency exchange rate between U.S.…
Q: Please write a program which asks for the user's name. If the name is anything but "Jerry", the…
A: To find the error in the given code: name = input("Please tell me your name: ")if name == "Kramer":…
Q: Write a program that converts square meter into ping. The program prompts the user to enter a number…
A: Java program to convert square meters into ping Given: one square meter =0.3025 ping Approach: -…
Q: Write a program to have the user guess a number stored in the program. If he guesses right, tell him…
A: While doing programming in any programming language, you need to use various variables to store…
Q: Write a program that prompts the user to enter the annual income (in int) of an employee. The…
A: create variables for tax and income use for loops for the given percentage of taxes that are payable…
Q: Write a program that prompts the user to enter the total time in seconds and displays the hours,…
A: GIVEN:
Q: Write a program that calculates and prints the total bill at a restaurant. Prompt the user for the…
A: Since you are not mentioning the programming language, here we are using Python to complete the…
Q: Write a program that prompts the user to enter two integer numbers A and B. The program must check…
A: Using if else and for loops we can solve this problem.
Q: Write a program that asks the user for the price of several items sold until the user answers with…
A: logic:- use while True to iterate infinite time read value check if value==‘N’…
Q: write a program that prompts the user to enter the number of students and each student name and…
A: The java program and the approach that prompts the user to enter the names and the scores of the…
Q: Write a program that prompts the user to enter the name, the number of children, and the basic…
A: Please give positive ratings for my effort. Thanks. PROGRAM #include<bits/stdc++.h>using…
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images
- Write a program that prompts the user to enter apoint (x, y) and checks whether the point is within the rectangle centred at (1, 1)with width 10 and height 5. For example, (2, 2) is inside the rectangle and (6, 4)is outside the rectangle, as shown in Figure . (Hint: A point is in the rectangleif its horizontal distance to (0, 0) is less than or equal to 10 / 2 and its verticaldistance to (0, 0) is less than or equal to 5.0 / 2. Test your program to cover allcases.) Here are two sample runs. Enter a point with two coordinates: 2 2 ↵EnterPoint (2.0, 2.0) is in the rectangleWrite a program that prompts the user to enter a sequence of numbers until a -999 is entered. It will print the numbers the user entered, five number in a row,with a before the first number and after the last number in each row. For example, Enter a number (-999 to stop): 23Enter a number (-999 to stop): 15Enter a number (-999 to stop): 1Enter a number (-999 to stop): 7Enter a number (-999 to stop): 9Enter a number (-999 to stop): 21Enter a number (-999 to stop): 17Enter a number (-999 to stop): 33Enter a number (-999 to stop): -999[23 15.17 9] [21 17 33]Write a program that generates a random number in the range from 1 through 100 After generating the random number, the user is to guess the number. If the user’s guess is higher than the random number, the program should display “Too high, try again” If user’s guess is lower than the random number, the program should display “Too low, try again”. If the user guesses the number, the program should congratulate the user and then generate a NEW random number so the game can start over. Make the game menu driven with these options Main Menu ______________ 1)Play Game 2)Exit written in python
- Write a program that asks the user how many credit units they have taken. If they have taken 23 or less, print that the student is a freshman. If they have taken between 24 and 53, print that they are a sophomore. The range for juniors is 54 to 83, and for seniors it is 84 and over.Write a program that prompts the user to enter apoint (x, y) and checks whether the point is within the circle centered at (0, 0) withradius 10. For example, (4, 5) is inside the circle and (9, 9) is outside the circle, asshown in Figure (Hint: A point is in the circle if its distance to (0, 0) is less than or equal to 10.The formula for computing the distance is __________________√(x2 - x1)2 + (y2 - y1)2. Test your program to cover all cases.) Two sample runs are shown below: Enter a point with two coordinates: 4 5 ↵EnterPoint (4.0, 5.0) is in the circleWrite a program that promotes the user to enter the number of students and each student's name and score ,and finally displays the student with the highest score and the second highest score.
- Write a program that allows a user to enter any number of student quiz scores, as integers, until the user enters 99. If the score entered is less than 0 or more than 10, display Score must be between 10 and 0 and do not use the score. After all the scores have been entered, display the number of valid scores entered, the highest score, the lowest score, and the arithmetic averageWrite a program that prompts the user to enter the radius of the rings and draws an Olympic symbol of five rings of the same size with the colors blue, black, red, yellow, and green, as shown in Figure 3.5c.Write a program that asks users when their birthday is. Use information provided to give them their astrological sign. Each of the twelve signs should display a different horoscope. Use the following dates for each sign, keeping in mind that both month and day must be evaluated for an accurate result. Aries: March 21–April 20 Taurus: April 21–May 21 Gemini: May 22–June 21 Cancer: June 22–July 22 Leo: July 23–August 22 Virgo: August 23–September 23 Libra: September 24–October 23 Scorpio: October 24–November 22 Sagittarius: November 23–December 21 Capricorn: December 22–January 20 Aquarius: January 21–February 19 Pisces: February 20–March 20
- Using Paython Write a program that asks a student for his grade (out of 100) in 3 exams and then print out his final grade (out of 100), given that the weight of the first exam is 30%, the second 30%, and the third 40%.Example Input:Exam1: 70Exam2: 80Exam3: 90Example Output:Total Grade = 81Explanation: 0.3 * 70 + 0.3 * 80 + 0.4 * 90 = 81Write a program that prompts the user toenter the year and first day of the year, then displays the first day of each month inthe year. For example, if the user entered the year 2013, and 2 for Tuesday, January1, 2013, your program should display the following output: January 1, 2013 is Tuesday...December 1, 2013 is SundayWrite a program that implements a tip calculator. Your program should ask the user for the bill amount and the percentage of the tip, and then output the dollar amount of the tip and the final bill in three different formats. (see sample below) Example: Enter the bill amount: 27.95 Enter tip percentage: 17 A 17.0% tip on $27.95 equals $4.7515. The total bill is: 32.701499999999996 The total bill is $32.7. The total bill is $32.70.