score is an int variable, consider the following if statement: if (score >= 90), cout << "Discount = 10%"; What is the output if the value of score is 95? What is the output if the value of score is 85?
Q: Suppose goals is a variable of type int. Write an if-else statement that displays the word Wow if…
A: Given : Suppose goals is a variable of type int. Write an if-else statement that displays the word…
Q: Suppose salary and bonus are variables of type double. Write an if-else statement that displays the…
A: Suppose salary and bonus are variables of type double. Write an if-else statement that displays the…
Q: The variable for level should be of int type. The bonus attack speed % should be converted to…
A: We need to create a Program that computes the current attack speed at a certain level. We need to…
Q: SNAIL-MAIL COMPANY charges Php28.99 per telegram that does not exceed 12 words and Php2.50 pesos for…
A: Program code: #include <stdio.h> int main(){ char name[50]; int word_length;…
Q: Suppose speed and visibility are variables of type int. Write an if statement that sets the variable…
A: Given; Suppose speed and visibility are variables of type int. Write an if statement that sets the…
Q: at converts 47 degrees to radians and assig
A: Below statement that converts 47 degrees to radians and assigns the result to a double variable.
Q: usiness that uses functions to calculate the weekly payment amounts of employees in a workplace. you…
A: A business that uses functions to calculate the weekly payment amounts of employees in a…
Q: there are three seating categories at a stadium. for a softball game, class A seats are $30, Class B…
A: In the above code, it has been asked to print the how many tickets for each class of seats were sold…
Q: 3. Output greatest value. Given three numbers, write a program that outputs the number with the…
A: import java.util.*; //Main classpublic class Main{ //Main class method public static void…
Q: Convert the following conditional statement to switch statement: if (numBooks >=0 && numBooks <=2)…
A: 1. The switch structure for the given code is shown below. switch(numBooks){ case 0:…
Q: How many times the statement "Statement" is printed in the following code? void fun(int R)…
A: the answer is as follows
Q: 1. Prompt the user and read in the number of a team playing the current game, i.e. Team 1, Team 2,…
A: #C code- #include <stdio.h>#define SIZE 7 int main() { int points[SIZE] = {0}; int…
Q: Convert the following conditional statement to switch statement: if (numBooks >=0 && numBooks <=2)…
A: Convert the following conditional statement to switch statement: if (numBooks >=0 &&…
Q: An employee is paid at a rate of $16.78 per hour for regular hours worked in a week. Any hours that…
A: Program Explanation: 1) Here are input and output methods that are to be used. 2) Use the access…
Q: Write a program that request for two fertilizer name and their respective yields. Your program…
A: Since, programming language is not mentioned so I have used C++ programming language. Create a class…
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: evaluate a int data type using switch, the evaluated variable needs to be enclosed in single…
A: The idea is that when building text strings that contain quote marks and apostrophes, you must be…
Q: What is the wrong in the following programming statement? A- if (age >= 65); cout <<"Age is greater…
A: Answer:
Q: Clunker Motors Inc. is recalling all vehicles in its Extravagant line from model years 1999-2002. A…
A: Code for the above requirements is given in next step
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: Suppose that you have the following conditional expression. (Assume that all the variables are…
A: a. Value of “fertilizingCharges”: The value of “fertilizingCharges” when the value of “backyard” is…
Q: STARBUCKS COFFEE offers a loyalty rewards program for customers with two levels: Green and Gold. It…
A:
Q: Puma Filling Station sells gasoline and has a car wash. Fees for the car wash are K40.00 with a…
A: Pseudocode: Input number of liters purchased Input kind of gasoline purchased Input car wash…
Q: Write an if-else statement that classifies the value of an int variable N into one of the following…
A: if else statement is used to check in which condition our variable fall down Like in this condition…
Q: The following code finds if age is between 18 and 40 (both inclusive) or not. What will be the…
A: According to the Question below the Solution:
Q: Write the statement in words if: p: Firemen work hard. q: Firemen wear red suspenders 3) ~p → q
A: Please refer to the following step for the complete solution of the problem above.
Q: Using Java programming language write a program to manage a hotel with 24 rooms; 10 rooms are…
A: It is defined as
Q: What does the following code print out? $cash on hand = 31; $meal = 25; $tax 10; $tip 10; while (…
A: 1) Code in question does below activity It defines below variables and assign them values…
Q: QUESTION 8 Write an if/else statement that compares the value of two variables, lastYrTaxes and…
A: Given:
Q: n is an int variable, it has a positive value. Write the if statement that checks if the 2…
A: Here is your answer
Q: Q/If my type is a true variable of 5, then when the following code is executed, the output is:…
A: Here the switch case is executed. This means depending on value of switch case, one of the case will…
Q: Modify the program you wrote in Programming Challenge 19 so that it reports the number of pizzas you…
A: PROGRAM CODE: #include <iostream>#include <iomanip>#include<cmath>using…
Q: Write an if -else statement that assigns True to fever if temperature is greater than 98.6;…
A: Given requirement, Write an if-else statement that assigns True to fever if the temperature is…
Q: QtAnswer the following (you are free to (assign the variables) sqrt(x)+abs(-20) S=…
A: let x=9 y= 5.5
Q: Houl 4O Part E Question 1 Part E Question 2 Part E Question 3 Part E Question 4 Part E Question 5…
A: The correct code for the perimeter is:-
Q: is an operator which can be used for checking if two values are the same.
A: _______is an operator which can be used for checking if two values are the same. The…
Q: What is the output of the following statements? a. if ('K' > '%' || '@' <= '?')cout <<…
A: (a) Output of the given statement: ?%!! Explanation: The ascii value of “K” is 75 and ascii of…
Q: Assume that M is declared as int, and a value is stored in it. How would you check *? whether N is…
A: N is between 3 and 9 So it will be 4,5,6,7,8 Ans is if(M>3 && M<9) This means M is…
Q: getPrice(durianClass, durian Weight) double price=0 durian Class A? F durian Class B? T price=weight…
A: We need to write a C++ program for the given scenario.
Q: What would be displayed as the daily dosage of medicine to be administered to a dog weighing 4…
A: The above algorithm is used to get the daily dosage of medicine for a dog based on its weight.…
Q: QUESTION 8 Write an if/else statement that compares the value of two variables, lastYrTaxes and…
A: The question is on: writing the code in java with respect to the given question.
Q: Enter desired auto service: oil change You entered: Oil change (2) Output the price of the requested…
A: The answer is
Q: Constants Type in the missing keyword to declare a constant variable named "var" of type double.…
A: The syntax for declaring a constant is const variable-type variable-name = initial-value; const is…
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: In a complete statement, declare a boolean variable named goodToGo and initialize it to true if the…
A: Since programming language is not mentioned so I have used C++ programming language to write the…
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: If the int variables i, j, and k contain the values -1, 8, and 2, respectively, and flag is false,…
A: In this question, we have a logical expression and we have to tell the result of it. In this logical…
Q: "Meadowdale Dairy Farm sells organic brown eggs to local customers. It charges $3.25 for a dozen…
A: Take egg quantity input from the user. As dozen = 12, Calculate dozen by dividing total eggs by 12.…
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
- The variable for level should be of int type. The bonus attack speed % should be converted to decimal (divide by 100) before multiplying by the level. For example, if the user enters 4% for the bonus attack speed, the formula will use 0.04 instead of 4. Round the current attack speed to the nearest three (3) decimal places.Compute total cost A drink costs 2 dollars. A taco costs 3 dollars. Write a statement that assigns totalCost with the total meal cost given the number of drinks and tacos. Ex: 4 drinks and 6 tacos yields totalCost ® Check totalCost's value Expected: 26This function returns the location of a local variable named . The group of response options is acceptable as long as it is released later. resulting in a pointe that is hanging
- If the purchase is 1000, what would be the value of the discount rate after the following pseudo code statements are executed. The code below is not a syntax error. Set discountRate = 0.0 Set purchase = 1250 if purchase > 1000 Set discountRate = 0.05 if purchase > 750 Set discountRate = 0.03 if purchase > 500 Set discountRate = 0.01 else Set discountRate = 0Question 10 programming in racket Write a procedure (timezone) that takes no arguments and returns a ; *string* indicating your time zone. ; Remember the difference between a procedure call and the evaluation of a variable! ; Ex: (timezone) => "EST"In visual basic programming, write a button click even that will take a given amount in cedis and exchange rate and calculate the equivalence in US dollars when the user chooses "Yes", returns the cedi valuewhen the user chooses "No" and Zero when the user chooses "Cancel".
- Question: Party budget planning - complex Prompt the user to enter their current budget and the number of people who need to share a meal. You are ordering food from a restaurant that has two menu items: Tacos $4 Empanadas $3 Calculate and print out all the options of meals where the budget is used entirely(where possible) and each person has an equal number of items to eat. They may eat different things, but everyone gets the same number of food items, e.g. 2 tacos or 1 empanada and 1 taco or 2 empanadas. Hints: Here are some things that might help you in your solution. If total items purchased does not equally divide by the number of diners, then abandon that combination. It may help to calculate the max number of empanadas that the budget can buy and also the max number of tacos that the budget could buy. These can be thought of as upper bounds in your loops. In your solution, keep track of items per person Also, keep track of total number of viable solutions, as that might…Question: Party budget planning - complex Prompt the user to enter their current budget and the number of people who need to share a meal. You are ordering food from a restaurant that has two menu items: Tacos $4 Empanadas $3 Calculate and print out all the options of meals where the budget is used entirely(where possible) and each person has an equal number of items to eat. They may eat different things, but everyone gets the same number of food items, e.g. 2 tacos or 1 empanada and 1 taco or 2 empanadas. Hints: Here are some things that might help you in your solution. If total items purchased does not equally divide by the number of diners, then abandon that combination. It may help to calculate the max number of empanadas that the budget can buy and also the max number of tacos that the budget could buy. These can be thought of as upper bounds in your loops. In your solution, keep track of items per person Also, keep track of total number of viable solutions, as that might…Write an if-else statement that works like this: If the sales variable is greaterthan or equal-to 50,000, the commissionRate variable should be assigned the value 0.2. Otherwise, the commissionRate variable should be assigned the value 0.1.
- Write a series of if statements that will evaluate your grade contained within a variable called semesterGrade and displays your letter grade according to your course syllabus: 90-100 A 87-89 B+ 80-86 B 77-79 C+ 70-76 C below 70 FWith a combined assignment operator, you can re-write the following statement to __.amount = amount * 5;Write an if-else statement that works like this: If the sales variable is greater- than or equal-to 50,000, the commissionRate variable should be assigned the value 0.2. Otherwise, the commissionRate variable should be assigned the value 0.1.