Prompt the user to enter in the three number that define a quadratic ??2+??+?=0ax2+bx+c=0, that is prompt the user to enter in numbers a, b, c. Compute the two solutions to the quadratic (i.e., solve for x). We will assume the user inputs numbers that result in a positive discriminant. Display the results.
Q: The owners of the Annan Supermarket would like to have a program that computes the weekly gross pay…
A: Define the class Employee with data members as pay rate for hour, hours worked, first name and last…
Q: Which of the following statements are true? In each case you should justify your argument…
A: i.The condition is true. a) The condition X>Y b) Next X is assigned twice of its original value…
Q: Write a program for calculating the simple interest on a loan when the initial prin- cipal amount…
A: PROGRAM CODE: public class Main{ public static void main(String[] args) {…
Q: The expression intNum * intNum * intNum is equivalent to which of the following expressions? a.…
A: Given expression: intNum * intNum * intNum; In the above expression, the variable “intNum” is…
Q: In [ ]: # write a program to accept a number from the user, # print "Play basketballL" if the number…
A: PROGRAM CODE: n = int(input("Enter the number: ")) // take number from the userif n<=15:…
Q: (c) Write a program that asks the users to caleulate volume of a rectangular prism, in cm', where…
A: Given: To write a code.
Q: Write a program that asks the user to enter the material they wish to purchase (wood, brick, or…
A: def wood(n): costSingle = 0 shippingCharge = 0 if(n>=1 and n<100): costSingle…
Q: Write a program that computes the employee's payroll of ABC Company. The user is first asked to…
A: Formula to calculate the gross income of an employee Gross Income =Hourly Rate * Number of Hours…
Q: Prompt the user to enter a value for dollars, which must not be greater than 150 If the entry is 80…
A: Python Program :
Q: What is the output of the following segment of code if 4 is input by the us asked to enter a number?…
A: Switch case is branching statement. An expression is passed within switch and corresponding case is…
Q: Which is the correct statement in the following? O if (x = 0) cout << "x is zero"; %3D if (x < y <…
A: Here, I have to choose an option for the above question.
Q: Write program: prompt user to enter 2 double numbers which are the radius of 2 circles. Save values…
A:
Q: Question 3.2 Evaluate the following postfix expressions, giving your answer as a single number: a)…
A: Following are the steps to evaluate postfix expression:- First we read expression from left to…
Q: Write a program that calculates the cost of 3 bags of fruit. The 4 possible fruits are pears which…
A: A loop is used to execute a block of code several times. The number of iterations is based on a…
Q: int main() { if(var1>50) { num = 20.0 } else { if(var1>35) ---- Line 7 { num= 35.0; }…
A: Given: In order for the value of num to equal 60.0, what should the result of the condition in line…
Q: IN C# (reject if you can't do C# please): Write an application that runs 1,000,000 games of craps…
A: Answer has been explained below:-
Q: Write a program that asks the user to enter two integers, obtains thenumbers from the user, then…
A: C++ Program for above : #include <iostream> using namespace std; int main() { //read…
Q: Calculator: Initially asks for two numbers. Afterwards, ask the user to select the operator and…
A: def Compute(x,y,op): x=int(x) y=int(y) if op=="+": return x+y if op=="-":…
Q: What is the output of the following segment of code if the value 4 is input by the user?int num;int…
A: Solution: The output for the given program is “13” when the user gives “4” as the input.
Q: Given the following declarations, evaluate each of the following expressions and give the results.…
A: I have given value for all the expression and also provided proof in c++ code.
Q: Write a program that asks the user for three numbers and print the numbers in either ascending or…
A: n1 = float(input("Enter number a: "))n2 = float(input("Enter number b: "))n3 = float(input("Enter…
Q: Write a program that prompt the user to enter a food product category, and price in USD. The program…
A: C++ Program for above : #include <iostream> using namespace std; int main() { cout…
Q: Write a program that asks the user to enter an amount of money in the format of dollars and…
A: Program: quarters = 0 dimes = 0 nickels = 0 pennys = 0 print("Please enter aomunt in the…
Q: Valuate the given expressions. All values are an integer folnat. inta=10,b=11c-16,d-0,e-2 Question 1…
A: Operator precedence:- and associativity ,
Q: Write a code snippet that prompts the user for an integer named number and prints out “Good Number”…
A: Following is the python program that takes input from user and print Yes if the number meets any of…
Q: We have a house with 3 rooms. We need the user to enter 1 integer as double as the useless area, 1…
A: Introduction: Plan of Action: Create a class residence. ' Created a secret variable for use only by…
Q: This assignment requires you to plot (in text) a quadratic function at certain points. • Ask the…
A: Correct code def q(a,b,c,x): return a*x**2 + b*x +c def pq(a,b,c,x): print(f'At x= {x} ,y=…
Q: PartA part B What is the value of Y after solving the following expression? Y= Not 15 Mod 5 = 24/6…
A: - We need to highlight the correct option amongst the provided ones for the expression. - In part…
Q: What will the following Code segment print on the screen? int P = 30; int Q = 20;…
A: Given data: int P = 30;int Q = 20;System.out.println("Your Total purchase is \n" + (Q*P) +"…
Q: Magic program ask user to enter three integers by the user, the three integers represent left bound,…
A: Given:- Magic program ask user to enter three integers by the user, the three integers represent…
Q: 4. The expression intNum * intNum * intNum is equivalent to which of the following expressions? a)…
A: “Since you have asked multiple questions, we will solve the first question for you. If you want any…
Q: Ask the user to enter a day of the week in 3 letters. * Respond with the meal plan for that day.…
A: PROGRAM: //Header file import java.util.Scanner; //Defining the class class WeeklyMeakPlan {…
Q: 1. Write a simple program to determine the credit card types according to annual income and user…
A: #include <iostream> using namespace std; int main(){ int inc,interest;…
Q: QUESTION 8 Kebabo Internet Services offers customers with 600 weekday minutes for a flat rate of…
A: ANSWER:-
Q: int Func1(int a, int b) { return a+b; } Which of the following call is correct? O Func1(12, 4); O…
A: In the given function int Func1(int a, int b){ return a+b;} for this option A is correct i.e.…
Q: owing statements is false? * A. The value of the following expression is 3: 17 % 5 B. The…
A: Which of the following statements is false? * A. The value of the following expression…
Q: Prompt the user to enter in the three numbers that define a quadratic ??2+??+?=0ax2+bx+c=0, that is…
A: Solution: Given, Prompt the user to enter in the three numbers that define a quadratic. prompt…
Q: The date June 10, 1960, is special because when we write it in the following format, the month times…
A: since you have not mentioned the programming language, I will attempt in python. please repost again…
Q: Each true or false is a subpart to the same question. Thanks. True or False 1. [ {int id1; idz = id1…
A: A per guidelines we can answer only first three sub-parts so for answer of rest parts please ask…
Q: LET the user print his name and ask him as it is am or pm and print the message accordingly hi name…
A: NOTE: SINCE THE LANGUAGE OF THE PROGRAM IS NOT MENTIONED IN THE QUESTION, I HAVE USED PYTHON FOR…
Q: What is the output of the following segment of code if the value 4 is input by the user? int num;…
A: When the user input the value 4. So, num=4 It will then go into switch case by matching the num…
Q: Can this be done in a form of a flowchart please? 1. Prompt the user and read in the number of a…
A: Flow chart is a step by step in which the sequence of steps are connected using the flows. In Flow…
Q: Write a simple payroll program that will display the employee's information, The program should…
A: Question given: Write a Java program that display employee's payroll information. Ask from user…
Q: Write a program to ask user to enter number of guests as an integer, and number of hotel available…
A: The solution is provided below
Q: Q3: Write the algorithm for a program that calculates the cost of the phone bill according to the…
A: The algorithm is shown below. Algorithm PhoneBill(minutes) //Algorithm to find teh total…
Q: Ask for and get three doubles from the user; the numbers represent the values for a, b, and c that…
A: Roots of a quadratic equation : The roots of a quadratic equation, can be calculated by using the…
Q: The date June 10, 1960, is special because when we write it in the following format, the month times…
A: Java : Java is a class-based, object-situated programming language that is intended to have as…
Q: Magic program ask user to enter three integers by the user, the three integers represent left bound,…
A: I have written code below:
Q: Write a program to: Prompt the user for each employee’s id (an integer value) and the sales…
A: C++ Program Code: #include<iostream>#include<iomanip>#define MAX 20using namespace std;…
Q: Write a program that asks the user to enter a day (from 1 to 31), a month (from 1 to 12), and a two…
A: here in this question we have asked to write a program which take a day (from 1 to 31), a month…
Prompt the user to enter in the three number that define a quadratic ??2+??+?=0ax2+bx+c=0, that is prompt the user to enter in numbers a, b, c. Compute the two solutions to the quadratic (i.e., solve for x). We will assume the user inputs numbers that result in a positive discriminant. Display the results.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 2 images
- Write a program that asks the user for three numbers and print the numbers in either ascending or descending order according to the user's choice. Forexample, Enter number a: 3Enter number b: 1 Enter number c: 6 Ascending order (Y or N): y In ascending order: 1.00, 3.00, 6.00 or Enter number a: 4Enter number b: 5 Enter number c: 9 Ascending order (Y or N): NV In descending order: 9.00, 5.00, 4.00 Requirement: This program should contain only one print() statement. You should build the output using string concatenation.The owners of the Annan Supermarket would like to have a program that computes the weekly gross pay of their employees. The user will enter an employee’s first name, last name, the hourly rate of pay, and the number of hours worked for the week. In addition, Annan Supermarkets would like the program to compute the employee’s net pay and overtime pay. Overtime hours, any hours over 40, are paid at 1.5 the regular hourlyrate. Net pay is gross pay minus taxes (Refer to the tax table on the second page).Define a class called Employee. The class must have private attributes to store the employee's name, hourly rate, and regular (≤ 40) and overtime hours worked. The class must also have methods to perform the following tasks:• A constructor to initialize the hourly rate to the minimum wage of $7.25 per hourand the hours worked (regular and overtime) to 0.0.• A method to get (a setter/mutator method)⬧ the employee's name⬧ the hourly rate⬧ the hours work for the month (by the week – assume 4…The owners of the Annan Supermarket would like to have a program that computes the weekly gross pay of their employees. The user will enter an employee’s first name, last name, the hourly rate of pay, and the number of hours worked for the week. In addition, Annan Supermarkets would like the program to compute the employee’s net pay and overtime pay. Overtime hours, any hours over 40, are paid at 1.5 the regular hourly rate. Net pay is gross pay minus taxes (Refer to the tax table on the second page). Define a class called Employee. The class must have private attributes to store the employee's name, hourly rate, and regular (≤ 40) and overtime hours worked. The class must also have methods to perform the following tasks: A constructor to initialize the hourly rate to the minimum wage of $7.25 per hour and the hours worked (regular and overtime) to 0.0. A method to get (a setter/mutator method)⬧ the employee's name⬧ the hourly rate⬧ the hours work for the month (by the week –…
- Write an application that will take - 5 digit integer from user and calculate the sum of all digits of the integer. The application signature is as follows:- for integer 34567 prints 25.Prompt the user to enter in the three numbers that define a quadratic ??2+??+?=0ax2+bx+c=0, that is prompt the user to enter in numbers a, b, c. Compute the two solutions to the quadratic (i.e., solve for x). Then assume the user inputs numbers that result in a positive discriminant. Display the results using simple python codeWhat is the value of the expression 10 + t1%t2*5/(t3-1)? Assume that, int t1=17, t2=3, t3=7;
- Write a program that prompts the user to enter 10 integers, and normalizes the integers to be in the range of 0 to 1 by dividing every integer with the largest integer. Display the 10 normalized real-valued numbers.Write an application that inputs three integers from the user and displays the sum, average, product, smallest, and largest of the numbers. [Note: The calculation of the average should result in an integer representation of the average. So, if the sum of the values is 7, the average should be 2, not 2.3333….]int main(){ if(var1>50) { num = 20.0 } else { if(var1>35) ---- Line 7 { num= 35.0; } else if (var1<80) { num=60.0; } else { num=40.0; }} What should be the outcome of the condition in line 7 in order for the value of num to be equal to 60.0?
- IN C# (reject if you can't do C# please): Write an application that runs 1,000,000 games of craps and answers the following questions (explain each step): How many games are won on the first roll, second roll, …, twentieth roll and after the twentieth roll? How many games are lost on the first roll, second roll, …, twentieth roll and after the twentieth roll? What are the chances of winning at craps? [Note: You should discover that craps is one of the fairest casino games. What do you suppose this means?] What is the average length of a game of craps?LET the user print his name and ask him as it is am or pm and print the message accordingly hi name good morningWrite a program that computes the molecular weight of a carbohydrate (ingrams per mole) based on the number of hydrogen, carbon, and oxygenatoms in the molecule. The program should prompt the user to enter thenumber of hydrogen atoms, the number of carbon atoms, and the numberof oxygen atoms. The program then prints the total combined molecularweight of all the atoms based on these individual atom weights:Atom Weight(grams I mole)H 1.00794c 12.01070 15.9994For example, the molecular weight of water (H20) is: 2(1.00794) +15.9994 = 18.01528.