Q4. Write a program that calculate the person's Body Mass Index (BMI). The BMI is often used to determine if a person is overweight, underweight for his/her height. BMI is calculated as: BMI = (weight * 703)/ (height*height) Here weight is in pounds and height is in inches. The program should display the message: - "Optimal Weight" if BMI is 18.5–25 - "Under Weight" if BMI is < 18.5 - "Over Weight" if BMI is > 25
Q: The annual rate of inflation is the rate at which money loses its value. For example, if the annual…
A: PROGRAM CODE: #include <iostream>#include <iomanip>using namespace std; int main(){…
Q: 1. Write a program where 52 deck of cards are suffled and 4 unique cards are dealt to a player. A…
A: #include<iostream> #include<cstdlib> #include<string.h> using namespace std; int…
Q: Complete the following program that finds which of the time points comes last. The time is expressea…
A: correct statements are: time1="12:00"time2="00:55"hh1,mm1 = time1.split(":")hh2,mm2 =…
Q: The interest paid on a savings account is compounded daily. This means that if you start with…
A: logic:- read startBal,Rate,N from user. Define function AccBalance which takes three parameters.…
Q: Q1/ Write a program that reads from the user the number of students in the class and their grades in…
A: Note: As no language is mentioned, therefore answering in python Input : Number of students Grade…
Q: An electronic shop wants you to write a program to take orders from the clients and print the…
A: while changing from input type to number to string, make sure you clean the unwanted spaces in the…
Q: Science P4.13The dew point temperature T. can be calculated (approximately) from the relative…
A: We have to write JAVA Code for following question:
Q: Write a program that calculates and displays a person’s body mass index (BMI). A person’s BMI is…
A: According to the Question below the Solution: Program Output:
Q: An electronic shop wants you to write a program to take orders from the clients and print the…
A: function main: Start read item read price read quantity read delivery type if delivery is fast then…
Q: Write a program that calculates and displays a person's body mass index (BMI). The BMI is often used…
A: Answer in step2
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: Suppose you deposit a certain amount of money into a savings account that earns compound monthly…
A: The below-given javascript program will obey the following rubrics: Declaring a function,…
Q: In Java: year in the modern Gregorian Calendar consists of 365 days. In reality, the earth…
A: import java.util.Scanner; public class Main{ public static void main (String[]args) { Scanner…
Q: Q3: Write a VB program to enter a mark of a student and then find his grade as follows: If mark >=75…
A: VB program is asked with the following conditions: If mark>=75 print Grade = A If…
Q: C++ code A simple version of snakes and ladder Implement a game that initially asks how many…
A: code snippet:
Q: STARBUCKS COFFEE offers a loyalty rewards program for customers with two levels: Green and Gold. It…
A:
Q: Q29) Consider you have a list of 20 exam scores. Write a computer program that calculates the…
A: #Code in MATLAB: clear; a=[73, 91, 37, 81, 63, 66, 50, 90, 75, 43, 88, 80, 79, 69, 26, 82, 89, 99,…
Q: Q2a) A milk carton can hold 3.78 liters of milk. Each morning, a dairy farm ships cartons of milk…
A: 2a) The code is given below: #include <iostream>#include <iomanip> using namespace…
Q: 13. Write a program that plays a simplified dice version of blackjack. Instead of selecting from a…
A: The Following Java Code contains 2 class Players.java Games.java
Q: Consider the following statements: T(x, y): "x eats y". A(x): "x is wise". S(x): "x is hungry".…
A: Answer: C
Q: A program that accepts insurance policy data, including a policy number, customer last name,…
A: Answer: I given in the form in hand written
Q: You are working for a lumber company, and your employer would like a program that calculates the…
A: Objective: This program would compute the total cost of woods of different types where the costs for…
Q: You are working for a lumber company, and your employer would like a program that calculates the…
A: Since you are not specifying any language for implementation, I am using C++. Program #include…
Q: Using Java programming language write a program to manage a hotel with 24 rooms; 10 rooms are…
A: It is defined as
Q: **CODE IS IN JAVA** Modify the BarChart program from Chapter 6 Exercise 13 to accept the number of…
A: Coded using Java.
Q: By using Loop in c++, you are responsible to develop a Credit Limit Calculator, which will determine…
A: Find Your Code Below
Q: In C++ language, create a program that gets quarterly sales from a user, and calculates the total of…
A: - We need to code for the sales program.
Q: Program33.java Write a program that generates a random Fahrenheit oral temperature between 92 and…
A: To generate a random number, Random class is used in java util library. nextInt(bound) method…
Q: Duke Shirts sells Java t-shirts for $24.95 each, but discounts are possible for quantities as…
A: Java Code:- import java.util.*; public class Main { public static void main(String[] args)…
Q: If you are flying with an economy ticket, there is a possibility that you may get upgraded to…
A: A decision table is a graphic representation that describes the logical link ( in understandable…
Q: Q1/ Write a program that reads from the user the number of students in the class and their grades i…
A: Code:Specific language is not mentioned so i am giving the code in c++ langauge: #include…
Q: A client in a store is buying 5 items: shirt, trouser, hat, shoes, and perfume. Write a program that…
A: According to the asked question, the solution is given below with a proper explanation.
Q: Develop a letter-guessing game in this assignment. Requirements: 1). When the game begins, generate…
A: The java code is given below:
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: 8. Write a program that calculates and displays a person's body mass index (BMI). The BMI is often…
A: Input weight, height Calculate BMI Use if conditional statements to check the person condition based…
Q: Complete the following program that finds which of the time points comes first. The time is…
A: (1 ) in if condition it will print that time1 comes first means hours of time1 must be less then…
Q: Q2. Write a program that reports the contents of a compressed-gas cylinder based on the first letter…
A: C program
Q: In java write a program that takes four int command-line arguments w, x, y, z,. define a boolean…
A: The java program and its approach are given below: - Approach: - Defining the main class and…
Q: Write a program in Java Write a program that calculates and displays a person’s body mass index…
A: import java.util.Scanner; public class Main{ //Function to calculate the BMI and printing the…
Q: Write a program that computes how much a customer has to pay after purchasing two items. Make the…
A: Step 1 : Start Step 2 : Take user input for the price of Item 1 and item 2. Step 3 : Calculate the…
Q: diagram last two digits of your student number (For example, if your student number is 1910602041,…
A: Here value of n is 34 So T = 34%25 = 1 i=2 j=0 i<9 -> True j=2 j<10 -> True T= T+j+i =…
Q: Consider a vending machine that offers the following options: [1] Get gum [2] Get chocolate [3]…
A: Objective: An application should be built considering the functionalities of a vending machine. It…
Q: In an eye-glass shop, a customer can buy either a pair Ol Sngle prescription sunglasses. On each…
A: Since no programming language was mentioned in the question, I have solved in C language.
Q: Sandwich Maker Write a program that asks users for their sandwich preferences. The program should…
A: The advantage of Python allowing elements of a list to be of various types is that we can store all…
Q: 3. A fast food restaurant sells the following products: Product Burgersteak Softdrinks Price PhP…
A: I have given C++ code to count the total amount paid by customer to by products.
Q: Consider a vending machine
A: #include<iostream>#include<string> using namespace std; struct item { string name;…
Q: Craps is a single player dice game, that proceeds as follows: 1. the player rolls 2 six-sided dice…
A: Code: The python program is given by import random #function to calculate the sum of 2…
Q: C# Write a program for The Carefree Resort named ResortPrices that prompts the user to enter the…
A: Algorithm: Start Read enter the number of days for a resort stay n If n==1 or n==2,calculate cost…
Q: E2.7 Write a program that prompts the user for a radius and then prints • The area and circumference…
A: We are going to take radius as input from the user and then we will find out area of the circle,…
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:
Step by step
Solved in 3 steps with 2 images
- Write a program that calculates and displays a person’s body mass index (BMI). The BMI is often used to determine whether a person with a sedentary lifestyle is overweight or underweight for his or her height. A person’s BMI is calculated with the following formula: BMI = weight × 703/height2 where weight is measured in pounds and height is measured in inches. The program should display a message indicating whether the person has optimal weight, is underweight, or is overweight. A sedentary person’s weight is considered to be optimal if his or her BMI is between 18.5 and 25. If the BMI is less than 18.5, the person is considered to be underweight. If the BMI value is greater than 25, the person is considered to be overweight.Input Validation: Determine what inputs the program needs the user to enter and what legal values the program should accept for these inputs.Problem: A company wants a program that will calculate the weekly paycheck for an employee based on how many hours they worked. For this company, an employee earns $20 an hour for the first 40 hours that they work. The employee earns overtime, $30 an hour, for each hour they work above 40 hours. Example: If an employee works 60 hours in a week, they would earn $20/hr for the first 40 hours. Then they would earn $30/hr for the 20 hours they worked overtime. Therefore, they earned: ($20/hr 40hrs) + ($30/hr 20 hrs) = $800 + $600 = $1400 total. For this assignment, you must create pseudocode and a flowchart to design a program that will calculate an employee's weekly paycheck. . Write pseudocode to design a programming solution by outlining a series of steps and using appropriate indentation and keywords. As you write your pseudocode, be sure to consider the following: What input does the computer need? What steps does the program need to follow to process the input? What output should…A company of 20 employees wants to find the employee who made the highest commission so he/she can be paid a 10% bonus of the commission he/she earned for that month. The commission an employee makes is calculated by multiplying the sales amount by the commission rate. The commission rates are shown below: Sales Amount Commission Less Than 40000 No commission 40000 to 80000 inclusive 5% Greater than 80000 10% Write a program to: Prompt the user for each employee’s id (an integer value) and the sales amount For each employee, display the commission earned Display the total commission earned by all the employees Display the average commission earned by an employee Display the employee id, the commission and the bonus paid to the employee with the highest commission Must be written in c++, no arrays to be used, only use iostream library
- 4. A software company sells game cartridges for $99. Quantity discounts are given according to the following: 10 - 19 20% discount 20 49 O 30% discount 50 – 99 O 40% discount 100 + O 50% discount Write a program that asks the user how many games they purchased. The program should then display the amount of the discount (if any) and the total amount of the purchase after the discount is applied. Don't forget to add HST. 5. Earlier we wrote a BMI calculator. Enhance the program so that it displays a message indicating whether the person has optimal weight (BMI between 18.5 and 24.9), is underweight (BMI is less than 18.5), is overweight (BMI between 25 and 29.9), or is obese (BMI 30 or higher).Meadowdale Dairy Farm sells organic brown eggs to local customers. It charges $3.25 for a dozen eggs, or 45 cents for individual eggs that are not part of a dozen. Write a program that prompts a user for the number of eggs in the order and then display the amount owed with a full explanation using the following wording: You ordered 27 eggs. That’s 2 dozen at $3.25 per dozen and 3 loose eggs at 45 cents each for a total of $7.85. So far everything is right but something in my equations is causing my ouput to show up as 45.0Meadowdale Dairy Farm sells organic brown eggs to local customers. It charges $3.25 for a dozen eggs, or 45 cents for individual eggs that are not part of a dozen. Write a program that prompts a user for the number of eggs in the order and then display the amount owed with a full explanation using the following wording: You ordered 27 eggs. That’s 2 dozen at $3.25 per dozen and 3 loose eggs at 45 cents each for a total of $7.85.
- Meadowdale Dairy Farm sells organic brown eggs to local customers. It charges $3.25 for a dozen eggs, or 45 cents for individual eggs that are not part of a dozen. Write a program that prompts a user for the number of eggs in the order and then display the amount owed with a full explanation using the following wording: You ordered 27 eggs. That’s 2 dozen at $3.25 per dozen and 3 loose eggs at 45 cents each for a total of $7.85. write a program that calculates the following: The program calculates the cost of 12 egss The program calculates the cost of 35 eggs The program calculates the cost of 6 eggs JAVA import java.util.Scanner; class Eggs { public static void main(String[] args) { // Write your code here } }Write a program that calculates and displays a person’s body mass index (BMI). A person’s BMI is calculated with the following formula: BMI = weight × 703/height2 where weight is measured in pounds and height is measured in inches. The program should display a welcome message, and ask for the weight (in pounds) and the height (in inches) from the user. The program should display a message indicating whether the person has optimal weight, is underweight, or is overweight. A sedentary person’s weight is considered to be optimal if his or her BMI is between 18.5 and 25 (including 18.5 and 25). If the BMI is less than 18.5, the person is considered to be underweight. If the BMI value is greater than 25, the person is considered to be overweight.Prompt Problem: A company wants a program that will calculate the weekly paycheck for an employee based on how many hours they worked. For this company, an employee earns $20 an hour for the first 40 hours that they work. The employee earns overtime, $30 an hour, for each hour they work above 40 hours. Example: If an employee works 60 hours in a week, they would earn $20/hr for the first 40 hours. Then they would earn $30/hr for the 20 hours they worked overtime. Therefore, they earned: ($20/hr 40hrs)+($30/hr 20 hrs) $800+ $600 = $1400 total. For this assignment, you must create pseudocode and a flowchart to design a program that will calculate an employee's weekly paycheck. - Write pseudocode to design a programming solution by outlining a series of steps and using appropriate indentation and keywords. As you write your pseudocode, be sure to consider the following: What input does the computer need? What steps does the program need to follow to process the input? What output should…
- Mad Libs are activities that have a person provide various words, which are then used to complete a short story in unexpected (and hopefully funny) ways. Complete the program to read the needed values from input, that the existing output statement(s) can use to output a short story. Ex: If the input is: Eric Chipotle 12 cars the output is: Eric went to Chipotle to buy 12 different types of cars. 367012.2549490.qx3zqy7 LAB 2.14.1: LAB: Mad Lib 0/10 ACTIVITY LabProgram.java Load default template... 1 import java.util.Scanner; 2 3 public class LabProgram { public static void main(String[] args) { Scanner scnr = new Scanner(System.in); String firstName; String genericLocation; int wholeNumber; String pluralNoun; 4 6 7 8 9 10 11 /* Type your code here. */ 12 System.out.println(firstName + } 13 went to + genericlocation + to buy + wholeNumber + differei 14 15&-6.Meadowdale Dairy Farm sells organic brown eggs to local customers. It charges $3.25 for a dozen eggs, or 45 cents for individual eggs that are not part of a dozen. Write a program that prompts a user for the number of eggs in the order and then display the amount owed with a full explanation using the following wording: You ordered 27 eggs. That's 2 dozen at $3.25 per dozen and 3 loose eggs at 45 cents each for a total of $7.85. Grading Write your Java code in the area on the right. Use the Run button to compile and run the code. Clicking the Run Checks button will run pre-configured tests against your code to calculate a grade. Once you are happy with your results, click the Submit button to record your score. Eggs.java + 1 import java.util.Scanner; 2 class Eggs { 3 4 5 6} public static void main(String[] args) { // Write your code here } > Terminal sandbox $ + Q Search this course ?code.An Auto Insurance Program Example - Write a program to determine the cost of an automobile insurance premium, based on driver's age and the number of accidents that the driver has had. The basic insurance charge is 500 Rs. There is a surcharge of 100 Rs if the driver is under 25 and there is an additional surcharge for accidents as can be seen below: No. of accidents Accident Surcharge 1 50 2 125 3 250 4 375 5 575 6 or more No insurance