Write a program using if . else statement to display student's bachelor class of graduation based on Cumulative Grade Point Average (CGPA) by referring to the table below. CGPA Class of Graduation >= 3.70 First class honors 3.00 – 3.69 Upper second class honors 2.30 – 2.99 Lower second class honors 2.00 – 2.29 Third class honors < 2.00 Failed
Q: Write 2 different programs using if statement and switch statement that presents the iser w/ a…
A: Algorithm: Start Show the menu of beverages to the user and ask the user to choose Set amountPaid…
Q: A company manufactures three products engines, pumps and fans. They give a discount of 10% on orders…
A: I have provided C++ CODE along with CODE SCREENSHOT and also provided OUTPUT…
Q: True or False? Every if statement must have a corresponding else.
A: Given, Statement: Every if statement must have a corresponding else.
Q: A cashier distributes change using the maximum number of five dollar bills, followed by one dollar…
A: Code comments have been added in the code for better explanation of the code for your reference.
Q: Engineering P4.4.1.9 A mass m is attached to the end of a rope of length r= 3 meters. The rope can…
A: Required: A mass m is attached to the end of a rope of length r = 3 meters. The rope can only be…
Q: The if-else if statement A bicycle salesperson was offered a choice of wage plans: a. A straight…
A: Step 1:- Program Approach:- 1.Declare 4 variables of data type double 2.Take the input from the user…
Q: Using C++ program 1. ( Use if-else statement ) Write a program for asking for a quiz score. The…
A: C++ program to solve the given problem is below.
Q: 3 points Save A 1. Write C++ statement(s) to check If the difference between volt 1 and volt 2 is…
A: code :-- #include <iostream> using namespace std; int main(){ float volt_1 = 3,volt_2 =24;…
Q: Implement the ff. decision table using a nested if statement. Assume that the grade point average is…
A: #include<iostream> using namespace std; int main(){ //input gpa float gpa; cout…
Q: 6. Positions on a chess board are identified by a letter and a number. The letter identifies the…
A: The program is implemented in C++ with object oriented approach. In the program we have first taken…
Q: Write C++ code for creating a menu driven calculator using if else as well as switch statement and…
A: Solution with detail explanation using cpp comments. // required header file#include…
Q: Write a program that calculates and displays a person’s body mass index (BMI). The BMI is often used…
A: C++ Program: #include <iostream>#include <cmath> // Included for using pow()…
Q: Write if-else if statements that will compare "price" variable with below values and output…
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 for the principal, the annual interest rate, and the number of times the…
A: Hello student. Greetings Hope you are doing great. As you have not mentioned any particular…
Q: rite a program to display pet adoption information. The program must use if-else statements. The…
A: #include <iostream>using namespace std; int main(){ int puppies, kitties;…
Q: Suppose that classStanding is a char variable, gpa and dues are double variables. Write a switch…
A: Program: //include the header file #include <iostream> using namespace std; //definition…
Q: A software company sells a package that retails for $99. Quantity discounts are given according to…
A: Find the total cost by multiplying quantity and price Check the quantity and based on condition…
Q: A variable in a program is a named placeholder that can contain any integer value. The statement z +…
A: Below is the complete solution with explanation of the given question. The value of each iteration…
Q: Assume: double soldYesterday, soldToday; int salesTrend; Write an if/else 2 statemente that compares…
A: Sold_today and sold_yest are the two variable which has data type double. For loop is used to check…
Q: Question 2 The following board is used to create a simple floor pattern in a game. Each cell is…
A: Since no programming language is mentioned, I am using python. Algorithm: Start Read a letter 'n'…
Q: Create a program using nested if else statement that would determine if the user is a voter for…
A: Input the age of user and initially check if age is less than or equal to 30 or not and then we are…
Q: Question 2: Write a Multiway if-else statement that prints out one of three different messages,…
A: Since no programming language is mentioned, I am using python. Algorithm: Start Read temperature…
Q: What is the wrong in the following programming statement? A if (age >=65); cout = 1, x++) cout <<x…
A: In question A wright program is as following if(age >=65) cout << "Age is greater than or…
Q: score is an int variable, consider the following if statement: if (score >= 90), cout << "Discount =…
A: the code is here
Q: Question 2: Write a Multiway if-else statement that prints out one of three different messages,…
A: Syntax of multiway if else:- if(condition) { statements } else if(condition) { Statements } else {…
Q: Write a Q. BASIC program that reads and outputs the weather status average using Nested IF…
A: I have implemented the following requirements with comments for better understanding of the code. I…
Q: In visual basic programming, write a button click even that will take a given amount in cedis and…
A: Hey, since there are multiple questions posted, we will answer first question. If you want any…
Q: A cashier distributes change using the maximum number of five dollar bills, followed by one dollar…
A: A cashier gives change by selecting as many five-dollar notes as possible, preceded through…
Q: Types of charges Room charges : Junior suite Deluxe suite Executive suite Critical care units:…
A: Since you have posted a question with multiple sub-parts, we will solve first three subparts for…
Q: Rewrite the following switch statement using a nested if-else structure (assume that n is a…
A: Above mentioned switch -case statement is converted to nested if-else statements. Equivalent Nested…
Q: (a) Re-write the following program by changing ternary / conditional operator to if-else statement.…
A: The ternary or conditional operator syntax is given by: x ? y : z ; Here x is a expression that is…
Q: Answer this question Write a program that calculates and displays a person’s body mass index…
A: Here language is not mention so we C language to fulfill the question requirement:…
Q: Write a program called CashRegister.cpp. The program should prompt the user for each item they are…
A: the c++ code is an given below : #include <iostream> #include <vector> using namespace…
Q: Using the following chart, write if/elif statements that assigns .10, .15, or .20 to commission,…
A: A pictorial representation of steps used to solve a problem is called flowchart. Each symbol used in…
Q: python programming 3 Write an if/else statement that assigns True to fever if temperature is…
A: if temperature > 98.6 : print("True to Fever") else: print(("False to Fever")
Q: QUESTION 8 Kebabo Internet Services offers customers with 600 weekday minutes for a flat rate of…
A: ANSWER:-
Q: Write an if-else statement with multiple branches. If givenYear is 2101 or greater, print "Distant…
A: Code with if else 1)First take the input from the user. 2)Store that year in a variable. 3) Pass…
Q: Suppose num is an int variable, declared and initialized. The value of num is between 2 and 12.…
A: Code using System; namespace MyApplication{ class Program { static void Main(string[] args)…
Q: Write a selection statements to to check whether the values of two variables i and j are divisible…
A: selection statement selects among a set of statements depending on the value of a controlling…
Q: Any statement may be placed.within an if statement, including other if statements. When you want to…
A: Output of the code is: Implementation using c++:
Q: Bank Utara Malaysia (BUM) has decided to give dividend to its accournt hoklers at thie end ul 2021.…
A: Find the required code in C++ given as below and output :
Q: Write out an IF-THEN-ELSE statement for the following conditions: 1. A person has credit card points…
A: Let's understand step by step : Answer (1) : 1. The Points_available will be the integer variable…
Q: What would be displayed as the daily dosage of medicine to be administered to a dog weighing 4…
A: Hello Student
Q: The East Coast sales division of a company generates 62 percent of total sales. Based on that…
A: CODE:- #include <iostream>using namespace std; int main(){ double PoTS = .62,…
Q: Write a program that calculates and displays a person’s body mass index (BMI). The BMI is often used…
A: Let's see the solution in the steps
Q: enger. The user inputs the ticket type (business/economy), as well as the of the passenger…
A: Q.6 Form1.html <html><body> <form action="calculate.php" method="POST"> Tiket…
Q: ercise Write a program using if graduation based on Cumulative Grade Point Average (CGPA) by…
A: Coded using Python 3 since the programming language is not mentioned.
Q: software company sells a package that retails for 599. Quantity discounts are given according to the…
A: According to the question we have to write C++ code for following question:
Q: e a statement using a conditional operator to do the following: if x is less…
A: 1. conditional operator in c int x,y,z; z = (x<y)? 20 : 0; Explanation if(x<y) { z=20; } else…
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
please answer as soon as possible
Step by step
Solved in 3 steps with 3 images
- Lab: switch Note: switch syntax is only applied for service selection. You can use if – else syntax for other comparison. Using switch syntax to write a program that calculates and prints the bill for a cellular telephone company. The company offers two types of service: regular and premium. Its rates vary, depending on the type of service. The rates are computed as follows: Regular service: $10.00 plus first 50 minutes are free. Charges for over 50 minutes are $0.20 per minutes. Premium service: $25 plus For calls made from 6:00 a.m to 6:00 p.m., the first 75 minutes are free; charges for more than 75 minutes are $0.10 per minute. For, calls made from 6:00 p.m. to 6:00 a.m., the first 100 minutes are free; charges for more than 100 minutes are $0.05 per minute. Your program should prompt the user to enter an account number, a service code (type char), and the number of minutes the service was used. A service code for r or R means regular service; a service…Following code in C using random Name Reg no and highschool name Use switch case in C language to do the following: Create a restaurant with the name “Your Name - Reg_No – Name of your highschool” The restaurant should come with the options of delivery and take away and the choice should be displayed as “Delivery – Registration No” and “Takeaway – Name” Each option should have the same menu and an extra 15% charge be included if a customer wants home delivery Both menus should have two items that are customizable, such as a burger can have chillies removed, cheese added and extra mayonnaise. The user should have the option of choosing multiple items with multiple quantity. Print a bill in the end.Text-based adventure game: Pretend you are creating a text-based adventure game. At different points in the game, you want the user to select to fight, run, or hide from certain enemies. Modify the application below (week3.py) so that the selection variable is sent as an argument into the choice() function. The user should enter 1 to fight, 2 to run, or 3 to hide in the main(). The choice() function should print one of the three options. You will need to add an if statement in the choice() function to make the correct selection.
- Payment = Principal [rate ((1 + rate)months)] [(rate + 1)months - 1] For the formula to compute monthly payment, see Listing 2.9, ComputeLoan.java. (Financial application: loan amortization schedule) The monthly payment for a given loan pays the principal and the interest. The monthly interest is computed by multiplying the monthly interest rate and the balance (the remaining princi- pal). The principal paid for the month is therefore the monthly payment minus the monthly interest. Write a program that lets the user enter the loan amount(Conversion) Write an assignment statement to convert temperature in degrees Fahrenheit to degrees Celsius. The formula for this conversion is Celsius=5/9(Fahrenheit32).software.cpp A software company sells a package that retails for $99. Quantity discounts are given according to the following table. Quantity 10-19 20-49 50-99 100 or more Discount 20% 30% 40% 50% Write a program that asks for teday's date (you MUST use cin >> date. Do not use getline(cin, date), the company name and the quantity'they wish to buy and computes the total cost of the purchase. If the user enters a negative value for the quantity, tell him/her "invalid quantity". If a zero is entered, tell "Hope you decide to buy our software in the future." Otherwise display an invoice in the same format shown below. Your prompts and outputs have to look exactly the same as the following sample run (spacing too). I used 30 spaces for the labels and 10 spaces for the numbers. [kslotteempress cs111_lec_fall16]s ./a.out Enter today's date (mm/dd/yy): 09/27/16 Enter your company name: Little Coffee Shop Enter the quantity you would like to purchase: 10 Invoice for Little Coffee Shop Price…
- Phython: Create a function so that when giving you a month it tells you the season of that month, for example: if it is January it will be winter.Using the def, try and except ValueError functions.C++ Language Write a program that prints a custom conversion table from Celsius temperatures to Fahrenheit and Newton (Links to an external site.) temperatures. The formula for the conversion from Celsius to Fahrenheit is : F=9/5*C+32 F is the Fahrenheit temperature, and C is the Celsius temperature. The formula for the conversion from Celsius to Newton is C = 100/33*N N is the Newton Temperature and C is the Celsius temperature Your program should prompt the user for a lower value and upper value for a range of temperatures in Celsius. It should then prompt the user for the amount they want to increment by. Then use a loop to output to a file named conversion_table.txt a table of the Celsius temperatures and their Fahrenheit and Newton equivalents within the range of values using the increment given by the user. Make sure to format your output to 2 decimal places. INPUT VALIDATION: Ensure the second number is greater than the first number, and make sure the increment is greater…! 1000$ by default, but discounts are applied to it based on different criteria. 1- Students get 20% discount. 2- People who purchase in 30 days in advance get 25% discount. 3- student purchasing 40 days in advance gets a 40% discount. This code segment calculates the final price. x = Text1.Text If x= "student" Then 1-... ElseIf x= "advance" Then price 1000 - 0.25 * 1000 ElseIf x= "stu_adv" Then price 1000 - 0.4 * 1000 2-...... price = 1000 3-..... 4-.. O = 1-price = 1000 - 0.2 * 1000 2-Else 3- End If 4-Print price 1-price 1000 - 0.2 * 1000 2-Else 3- Print price 4-End If 1-price = 3-End If 4-Print price = 1000 -0.2 * 1000 2-Elseif
- Assignment Content Write a program that lets the user enter the coordinates of the center and radius of two circles, circle 1 with center coordinates at (* Y1 and circle 2 with center coordinates at (X y,). The program then determines whether circle 2 is inside circle 1 or overlaps with circle 1. rl rl • (x1, y1) (x1, y1) (x2, y2), (x2, y2) Circle 2 is found to be inside circle 1 if distance between the centers is <=Tradius circle1 - radius cirede and circle 2 is said to overlap circle one if the distance between the two centers is <=radius circle1 + radius circle2- Test Cases: Enter center coordinates (x, y) and radius of circle 1:0.5 5.1 13 Enter center coordinates (x, y) and radius of circle 2:11.7 4.5 Circle 2 is inside of circle 1 Enter center coordinates (x, y) and radius of circle 1:3 75.5 Enter center coordinates (x, y) and radius of circle 2: 6.7 3.5 3 Circle 2 overlaps circle 1 Enter center coordinates (x, y) and radius of circle 1:3.55.5 1 Enter center coordinates (x, y) and…Serendipity Booksellers has a book club that awards points to its customers based on the number of books purchased each month. The points are awareded as follows: If a customer purchases 0 books, he or she earns 0 points. If a customer purchases 1 book, he or she earns 5 points. If a customer purchases 2 books, he or she earns 15 points. If a customer purchases 3 books, he or she earns 30 points. If a customer purchases 4 or more books, he or she earns 60 points. Creat an application in C# that lets the user enter the number of books that he or she has purchased this month and displays the number of points awarded.It's important to know how to best utilize the super keyword.