if (number % 2 == 0) if (number % 2 == 0) cout << number << " is even"; else if (number % 5 cout << number << is even"; cout << number << if (number % 5 == 0) cout << number << = 0) is multiple of 5"; is multiple of 5"; (a) (b)
Q: There are three seating categories at a stadium . For a softball game, Class A seats cost$15, Class…
A: Code: # include <iostream> #include <iomanip> using namespace std; int main() // main…
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: a) if ( age >= 65); puts( "Age is greater than or equal to 65"); else puts( "Age is less than 65" );…
A: Given: To find error in given C codes.
Q: Assume there are two variables, k and m, each already assigned a positive integer value and further…
A: python program is given below
Q: 3. B) What is the value of num when the following code snippet runs successfully? int num = 100;…
A: I give the solution to both with output screenshot I also give the code ,output and code screenshot…
Q: Part H: Worker Pay Write a program that asks the user to enter their name, pay rate (in $/hr) and…
A: steps for calculating total amount is if hour > 40: total = 40 * rate + (hour-40) * 1.5 * rate…
Q: int x = 2; int y = 8; Ilprint x and y values at this point while (x+y < 20)}{ x = x + 2; y = y - 1;…
A: a)Trace of the given program:initially x and y : 2,8now x=2,y=8x+y<20 : 10<20 is…
Q: T/F 4. The == operator can always be used to test whether two values are identical when evaluating…
A: please see the next step for solution
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: Bob takes medication three times a day. In the morning at 8:00, in the afternoon at 13:00, and in…
A: The Enum in C is a data type which contains a fixed set of constants. The enum constants are…
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: 4.20 LAB: Warm up: Automobile service cost (1) Prompt the user for an automobile service. Output…
A: In this first of all user get the menu of automobile services then user has to input which service…
Q: 5. A program determines it a user-entered weight exceeds a maximum weight of 25,000.0 pounds. Which…
A: 1) We need to write a program determine if a user-entered weight exceeds a maximum weight of…
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: In the below table, if a sale man attain a sale volume of $6000, he will be paid $6000x15%=$900.00.…
A: - We need to select the correct one for completing the code provided. - The first line has to fill…
Q: Write a statement that assigns finalValue with the multiplication of userNum1 and userNum2. Ex: If…
A: Answer the above questions are as follows:
Q: Write a program in which user is asked to enter two integers (divisor and dividend) and computes the…
A: Program Explanation :- In this Program, the user is required to enter two numbers (separator and…
Q: The following program is used in a bookstore to determine how many discount coupons a customer gets.…
A: #include <iostream> using namespace std; int main(){int numBooks, numCoupons;cout <<…
Q: We have 100 critics who have rated the top movie of the year: Enchantio! Write a C++ program that…
A: Hey there, I am writing the required solution for the above stated question.
Q: The great circle distance is the distance betweentwo points on the surface of a sphere. Let (x1, y1)…
A: Note: Programming language is missing in the question. So we will answer this program in Java…
Q: What is the wrong in the following programming statement? A- if (age >= 65); cout <<"Age is greater…
A: Answer:
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: Assume there is a variable, h that has already been assigned a positive integer value. Write the…
A: In step 2, you will get python code. In step 3, you can see the sample output.
Q: rice calculations, using the rules*: • The basic price of a ticket is $40. • Senior citizens (age >=…
A: the program is an given below : def main(): ticket_base_price = 40 name = input('Enter…
Q: STARBUCKS COFFEE offers a loyalty rewards program for customers with two levels: Green and Gold. It…
A:
Q: What will following segment of code output? int x = 5; if (x != 0) cout << "x is a non-zero…
A: The problem is based on conditional statement and output statement.
Q: 4. A software company sells game cartridges for $99. Quantity discounts are given according to the…
A: As per our guidelines, we are supposed to answer only one question. Kindly repost the remaining…
Q: A. If you have the following code: int a = 2, b = -3, c 2; %3D bool vall = false, val2 true; char ch…
A: There are many expression given with one code as per mentioned below, int a=2,b=-3,c=2; bool…
Q: blä: 3 This code program enters the value of x then the value of y is computed from one of the…
A: Required : To select proper statement from the given options.
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 a program that takes five students' quizzes in a course. Consider each student has given ten…
A: Best student will score highest average (sum of all quizes divided by the number of quizes) Worst…
Q: (1) Ask for the number of guests. Users will enter a negative number when guests leave and a…
A: Below is the python program and its approach: - Approach: - Declaring the variables and storing…
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: a) A prime number is an integer greater than 1 that is evenly divisible by only 1 and itself. For…
A: """PrimeNumber application that prompts the user for a number and thendisplays a message indicating…
Q: fice of plane 1000$ by default, but discounts are applied to it based on different criteria. 1-…
A: As per the given question, Case 1: If the person is student, then the student gets 20%discount. Case…
Q: A customer want to buy five items. He has only 120.0 OMR with him. The price of the products are…
A: Start Initialize amount in hand to 120 If amount>=5.50 amount=amount-5.5 If amount>=25…
Q: Rosa's Roses are $1.69 each but discounts are available for larger numbers. 1 dozen roses or more @…
A: Note: As no langauge is mentioned, therefore answering the given question in python. Input : The…
Q: If a=[3 5 7 9], then a(4, end) is: * 9 Οι Ο 5 Ο 3 Ο other: Ο Ο Ο Ο
A: Other is correct which is error out of bound Explanation Because when we are writing a(4, end) it…
Q: 9- The script in the left side is used to solve the right-side equation. #include #include using…
A:
Q: Different types for operators > equal →greater or equal > less or equal → not equal → greater → less…
A: The question on writing kotlin program to check the given condition.
Q: QUESTION 8 Kebabo Internet Services offers customers with 600 weekday minutes for a flat rate of…
A: ANSWER:-
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: program that prompts the user to enter the monthly salary amount of a act a 29% amount as a…
A: GIVEN: Create a Java program and get the monthly salary amount in OMR from the user. Deduct 2%…
Q: Enter desired auto service: oil change You entered: Oil change (2) Output the price of the requested…
A: The answer 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: Q5/A- create a QBasic program that will determine the price of traveler ticket based on customer s…
A: “Since you have asked multiple questions, we will solve the first question for you. If you want any…
Q: // A standard mortgage is paid monthly over 30 years. // This program is intended to display 360…
A: Answer: for(int i=0; i<30;i++)//this loop is for the year for(int i=0;j<12;j++) printf("the…
Q: int a=3, b=5, c=7, d=-2; if (d > 0) cout << a + b *c << endl; else cout << a * b -c<< endl; A -13 B…
A: This question of condition checking or conditional checking. So, let's just talk about this…
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: Suppose that you work for a beverage company. The company wants to know the optimal cost for a…
A: I have given an answer in step 2.
What is the output of the following code if number is 14, 15, and 30?
Step by step
Solved in 2 steps
- 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 libraryissignment Portion - hand in your wo nce completed "4.2 (Geometry: gneat circle distance) The great circle distance is the distance between two points on the surface of a sphere. Let(x1,y1)and(x2,y2)be the geographical latitude and longitude of two points. The great circle distance between the two points can be computed using the following formula: \[ d=\operatorname{radius} \times \arccos \left(\sin \left(x_{1}\right) \times \sin \left(x_{2}\right)+\cos \left(x_{1}\right) \times \cos \left(x_{2}\right) \times \cos \left(y_{1}-y_{2}\right)\right) \] Write a program that prompts the user to enter the latitude and longitode of two points on the earth in degrees and displays its great circle distance. The average radius of the earth is6,371.01 km. Note you need to convert the degrees into radians using the Math, toRadi ans method since the Java trigonometric methods use radians. The latitude and longitude degrees in the formula are for north and west. Use negative to indicate south and…If the number of items bought is less than 5, then the shipping charges are $7.00 for each item bought; if the number of items bought is at least 5, but less than 10, then the shipping charges are $3.00 for each item bought; if the number of items bought is at least 10, there are no shipping charges. Correct the following code so that it computes the correct shipping charges. if (numOfItemsBought > 10)shippingCharges = 0.0;else if (5 <= numOfItemsBought || numOfItemsBought <= 10);shippingCharges = 3.00 * numOfItemsBought;else if (0 < numOfItemsBought || numOfItemsBought < 5)shippingCharges = 7.00 * numOfItemsBought;
- 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…Question Sum implify the following expression by using the prope (x^(3))^(6)(x^(6))^(3) Full explain this question and text typing work only We should answer our question within 2 hours takes more time then we will reduce Rating Dont ignore this line.
- True or False If the value of y is 3.14, calling Math.floor(y) will return 3 and calling Math.ceil(y) will return 4.Ask the user to enter a day of the week in 3 letters.* Respond with the meal plan for that day. Here's the* plan:* Meatless Monday* Taco Tuesday* Wings Wednesday* Thrifty Thursday* Filet O Fish Friday* (Weekend is "Buffet Day")* * Ignore case, e.g. "Wed" or "WED" or "wed" all refer* to Wednesday.* * Example 1:* Enter a day of the week (3 letters): Wed* It's Wings Wednesday!* * Example 2:* Enter a day of the week (3 letters): SAT* It's Buffet Day!* Although my code isn't finished, it keeps printing out It's Meatless Mondays for the "TUE".Suppose that classStanding is a char variable, gpa and dues are double variables. Write a switch expression that assigns the dues as following: If classStanding is 'f', the dues are $150.00; if classStanding is 's', (if gpa is at least 3.75, the dues are $75.00; otherwise dues are 120.00); if classStanding is 'j', (if gpa is at least 3.75, the dues are $50.00; otherwise dues are $100.00); if classStanding is 'n', (if gpa is at least 3.75, the dues are $25.00; otherwise dues are $75.00). (Note that the code 'f' stands for first year students, the code 's' stands for second year students, the code 'j' stands for juniors, and the code 'n' stands for seniors.)
- Area Calculator: Prompt the user to enter two choices 1 or 2. If user enters 1 then ask him for length of side of square and if user enters 2 then prompt for length and breadth of rectangle. In both case the output should be the area of square (case 1) or rectangle (case2). In C++__ComputeSumOfDigits that prompts the user to type an integer and computes the sum of the digits of that integer.Input a number value for LEFT, RIGHT and X. If LEFT is greater than RIGHT, display the first ten numbers in descending order starting from X. If RIGHT is greater than LEFT display the first ten numbers in ascending order starting from X. If RIGHT and LEFT are equal, display “Equal Value” Use the UML diagram below as a guide. The following methods are as follows. setValues(int,int,int) – accepts the value for X, LEFT and RIGHT as parameters and returns the following: 0 if LEFT and RIGHT are equal 1 if LEFT is greater than RIGHT 2 if RIGHT is greater than LEFT. displayCount(int) – accepts the integer that represents the status of RIGHT and LEFT, and then display the expected result.