If you have the following statements: int num=5; while (num >5) num = num + 2; cout<
Q: When the following main function runs, what will display on the screen? int main() {int number;…
A: Output: The value is number
Q: Find the errors in the following code: The following statement should assign 0 to z if a is less…
A: The following statement should assign 0 to z if a is less than 10; otherwise, it should assign 7 to…
Q: Assume that qty and salesReps are both integers. Use a type cast expression to rewrite the following…
A: Assume that qty and salesReps are both integers. Use a type cast expression to rewrite the following…
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: Pasty1.py You do NOT need to use functions or a restart feature. You D0 need comments! Welcome to…
A: I have provided , PYTHON CODE along with CODE OUTPUT and also provided OUTPUT…
Q: #include using namespace std; void car(){ { cout << "Audi R8"; int main() { car("BENZ"); return 0;…
A: It will give compile time error. as, function Car has NO arguments but during function call ONE…
Q: (i) val = --h%k++ * 2;
A: I have mentioned answer in below steps, please find in below
Q: In which subprogram a RETURN statement does not return a value and so cannot contain an expression?…
A: The return statement is often written at the end of the program in order to make the compiler aware…
Q: Q: Create/Write the following C# console application/program/code as show in the figure below with…
A: Let's understand step by step : 1. First of all print the entire table using Console.WriteLine().…
Q: Compound condition Example: write a program to enter an integer number and then dete # i ange 0 and…
A: C++ is a programming language that is structural as well as procedural, it can also be called as the…
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: S. A company provides loans to new college graduates based on the following conditions: The…
A: The above question is answered in step 2 :-
Q: Function Name: dominosTime() Parameters: N/A Returns: None Description: During the summer, you…
A: Python used to answer this question
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: If value is an identifier of int type and is holding value 200, is the following statement correct?…
A: introductoin:Int datatype is used in holding values:
Q: The following declaration, program, and program segment has errors. Locate as many as you can.…
A: Answer: The "function header" is a portion of the function definition. It denotes, Function's…
Q: Medication dosage by weight A machine administers medication dosage based on weight. Write an…
A: According to the question given:- we have to create program for Medication dosage by weight For that…
Q: The declaration statement for a named constant requires . a. a data typeb. a name c. a value d. all…
A: For the declaration of a named constant requires data type, name and value. Hence, the correct…
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: Drow ER diegram please
A: ER diagram is the graphical representation of the relationship between an entity and its attributes.…
Q: а. int int=10;. b. int Double=20;. c. int class=1;
A: the variable name should start with alphabet and _ and is not of any keyword or datatype name.
Q: #include xoid main(void) int J: soutee"t in the if statement"ce"ia sd and jeid \n", L): cout *…
A: Given i=0 j=1 If condition i==0(true) so i=5
Q: When using a printf() statement, what syntax do you use to print the value of an "int"? %d %c %s %f
A: - The question wants to know that when using a printf statement what syntax we use to print an…
Q: A program contains the following function. int cube(int num) {return num * num * num; }Write a…
A: Function Call The function accepts a number of type int as a parameter and returns the cube value of…
Q: Using C++ oop Assume that qty and salesReps are both integers. Use a type cast expression to…
A: Using C++ oop Assume that qty and salesReps are both integers. Use a type cast expression to rewrite…
Q: Using Dev c++ Create an application containing 5 prices, such as $2.34, $7.89, and so on. The…
A: Here is the c++ code: See below steps for code.
Q: C++ program Vs Coding please!! General Crates, Inc. builds custom-designed wooden crates.…
A: According to the information given:- We have to write code in C++ for General Crates, Inc. builds…
Q: valuate the following expression: (3 % 5)
A: need to evaluate the following expression: (3 % 5)
Q: Write a program that has variables to hold three test scores. The program should ask the user to…
A: import java.util.Scanner; public class Main{ public static void main(String args[]) {…
Q: Using the following statements, what value is displayed? *include #include using namespace std;…
A: The program is written in the C++ programming language.
Q: DESCRIPTION Please make sure you use python 3+ version to do all of your homeworks. Please use…
A: Program: def main(): less_than_30000_count=0 between_30K_50K_count=0…
Q: A __________ specifies which parameter an argument should be passed into. a. named argument b.…
A: Named argument: C# specifies the parameter to which an argument must be passed to. For specifying…
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: in C# programming and i need to use using System; using static System.Console; using…
A: Actually, program is an executable software that runs on a computer.
Q: C++ program Vs Coding please!! General Crates, Inc. builds custom-designed wooden crates. With…
A: #include <iostream>#include <iomanip> using namespace std; int main(){ double len;…
Q: Write a C++ program to estimate your water bill for next quarter. Your water meter measures the…
A: #include <iostream>#include <cmath> using namespace std;int maxallo = 50; //declaring…
Q: Write a single scanf statement that reads user-entered time (three integers) and discards the…
A: Program: //include the header file #include <stdio.h> //definition of main function int main…
Q: Consider the following code segment: int numFeet, numInches; //number of feet // number of inches…
A: Note: Here you didn't mention any programming language So We are using the C++ programming language…
Q: + Multiple Conditional Statements EmployeeBonus2.py >- Terminal 1 # EmployeeBonus2.py This program…
A: Find out the mistake from the code.
Q: Which pair of values for a and b will t #include using namespace std; int main(void) int a,b; b
A: answer=2 a=4,b=1
Q: Ajax Manufacturing needs a program for employees to calculate gross pay themselves in order to have…
A: Working of the flowchart Prompt user to enter hours worked Read hours Prompt user to enter pay rate…
Q: Change Return Program: (Can you create flowchart for the following) The user enters a cost and then…
A: A flowchart is a picture of the separate steps of a process in sequential order. It is a generic…
Q: #include void main( ) { = 1; for (int i = 1, i >num; if ( num> 0 ) sum = sum + num; cout<<“the sum…
A: EXPLANATION --> Space is missing between int and num. Closing braces is missing of main…
Q: The following declaration, program, and program segment has errors. Locate as many as you can.…
A: Lets see the solution.
Q: int numFeet, numInches; // number of feet // number of inchea int totalInches -52; //total number of…
A: C++ used to answer this question
Q: Assignment statements based on input value Write an if-else statement that assigns finalValue with…
A: Answering first question as per the guidelines. The problem is based on the basics of functions in…
Step by step
Solved in 2 steps
- -s is optional and means that the mortgage will be a 15 year mortgage instead of the standard 30 year mortgage you would use as a default. -r is required and the argument is the yearly interest rate for the loan. The interest rate should be between 3% and 10% inclusive. -d is optional and the argument is the downpayment that will be made on the loan. It cannot be larger than the price of the home. You will print out the resulting payment amount as follows. Use rounding to keep money to two decimals and percentages to three decimals. "The payment on a loan of $###,###.## with an interest rate of #.###% for a term of ## years will be $##,###.##" There should be no other output at all to the screen.Need help coding in Java Morgan’s Department Store distributes bonuses to its salespeople after the holiday rush. Table 9-6 shows the bonuses, which are based on full weeks worked during the season and the number of positive online customer reviews. Write a program that allows a user to continuously enter values for the number of weeks worked and the number of positive reviews received and displays the appropriate bonus until the user enter a sentinel value: 99.c## please Write a Console Application that reads two integers, determines whether the first is a multiple of the second and displays the result. [Hint: Use the remainder operator.]
- Change Return Program: (Can you create flowchart for the following) The user enters a cost and then the amount of money given. The program will figure out the change and the number of twenty-dollar bills, ten-dollar bills, five-dollar bills, single-dollar bills, quarters, dimes, nickels, pennies needed for the change. You must have the maximum amount of higher denominations possible before allowing for lower denominations. For example, If your change is $18.88, You must have One Ten-dollar bill, One Five-dollar bill, Three singles, Three quarters, One dime and three pennies. There should be no nickels; No three Five-dollar bills etc.The following code intends to input a user’s first name, last name, and age.However, it has an error. Fix the code.string fullName;int age;cout << "Enter your first and last name." << endl;cin >> fullName;cout << "Enter your age." << endl;cin >> age;cout << "You are " << age << " years old, " << fullName << endl;(Conversion) Write an assignment statement to convert temperature in degrees Fahrenheit to degrees Celsius. The formula for this conversion is Celsius=5/9(Fahrenheit32).
- Ron bought several acres of farm to grow and sell vegetables. Suppose that Ron wants to grow a maximum of two types of vegetables. Write a program that prompts Ron or the user to do the following: Enter the total farm area in acres. The number of vegetables (one or two) that the user wants to grow. If the user wants to grow trwo types of vegetables, then specify the portion,as a percentage, of the farm land used for each type of vegetable. Enter the seed cost, plantation cose, fertilizing cost, labor cost, for each acre. Enter vegetable selling price per acre. Output the total revenue. Output the profit/loss.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…
- Determine whether each statement below is true or false. Assume no index is out of bounds. Write either "true" or "false" on each line. Note: The Math.random() method returns a pseudorandom double type number greater than or equal to 0.0 and less than 1.0. int[] a = new int[6]; int[] b = new int[6]; int[] c = a; c[0] = 3;True or False When you declare a named constant, an initialization value is required.TOPICS: Data and Expressions MUST BE IN JAVA. PLEASE USE COMMENTS AND WRITE THE CODE IN SIMPLEST FORM. Write an application that prompts for and reads the numerator and denominator of a fraction as integers, then displays the decimal equivalent of the fraction. Hint: This requires casting from integer to double before dividing. Testing: Submit testing exhibits using the following inputs:0, 1 giving 0.0; 1, 2 giving 0.5; 3, 8 giving 0.375; 2, 3 giving 0.666...; 25, 7 giving 3.57128...