Q1: Suppose x = 3 and y = 2. Show the output, if any, of the following code. What is the output if x = 2 and y = 3? What is the output if x = 4 and y = 4? Draw a flowchart of the code.
Q: Draw a flowchart for a program where user enter his mark for 3 different courses in the semester…
A: Flow chart
Q: 20. or the following code if x = 2: print ('Two or more) else : print (Something else) What value of…
A: We are given a code snippet and we will compare values of x, and statements will be printed…
Q: 5. What would be the output of the program represented by the following flowchart? start x=1 No XS…
A: Required:
Q: 6. Draw a flowchart that will input 20 integers. Output the number of negative values and the sum of…
A: As per our guidelines we are supposed to answer only one question kindly repost other question as a…
Q: I'm stuck on this problem, and here's what I'm stumped on: Meadowdale Dairy Farm sells organic brown…
A: The Answer is
Q: Create the flowchart of a program that will ask the user to input the value of the temperature in…
A: Celsius = (Fahrenheit – 32) * 5/9 Fahrenheit = (Celsius * 9/5) + 32 fahrenheit = float(input("Enter…
Q: Suppose x = 2 and y = 3. Show the output, if any, of the following code. What is the output if x = 3…
A:
Q: A company selling household appliances gives commissions to its salesman determined by the kind of…
A: Given: A company selling household appliances gives commissions to its salesman determined by the…
Q: Draw a flowchart of the following code, and show the output if x = -3 and y = 3.
A:
Q: Please draw a flowchart and write a program that finds the years divisible to 4 between the years of…
A: Actually, program is a executable software that runs on a computer.
Q: You are required to write a program to compute the area of square (area = side?) OR a triangle (area…
A: As per our company guidelines, we are supposed to answer only 3 subparts of question per post and…
Q: 11. What is the output for the following flowchart? 2 start x=5, n=1 ,m=1 Print n,m Increment n by 2…
A: Given Flow chart
Q: In the following flowchart, what value of S will be printed? BEGIN X=5, Y=3 |K=0, S=0 Is True X> 0…
A: Objective: Given a flowchart to compute the value of S by using a formula. All the initial values…
Q: program with a car's miles/gallon and gas dollars/gallon (both doubles) as input, and output the gas…
A: Introduction of Program: In this C++ program, the User enters the car consume how many miles in 1…
Q: Analyze the following code: int x = 0; if (x > 0) ; { System.out.println(x); } The code has…
A: Here the x has a value of 0. But in the if condition it is given that x>0, Since x=0 there the…
Q: Write two scnr.nextInt statements to get input values into birthMonth and birthYear. Then write a…
A: for input use scanner class
Q: Write pseudo code and design flowchart that will count all the count all the even numbers up to a…
A: Flow chart: It is used to represent program steps in the pictorial representation. Using the flow…
Q: Create the flowchart of a program that will ask the user to input the value of the temperature in…
A: The question is to write flowchart for the given problem.
Q: c) Draw a flowchart that input salary and grade. It adds 80% if the grade is greater than 18 and it…
A: a)
Q: Write C++ code for the following flowchart and answer the following questions : (1) If N =7 and X=y…
A: Algorithm: Start Read n,x values Initialize TERM=1,SUM=1,i=1 Iterate through the loop till i>n…
Q: A) Write a program that inputs temperature and display a message according to the following data:…
A: Program: #include <iostream> using namespace std; int main() { float temp; cout <<…
Q: Write a program with a car's miles/gallon and gas dollars/gallon (both doubles) as input, and output…
A: import java.util.*;class Test89 { public static void main(String args[]) { Scanner sc = new…
Q: Create a flowchart that will accept two integers. If the integers are equal, print the sum of the…
A:
Q: Suppose x = 3 and y = 2; show the output, if any, of the following code. What is the output if x = 3…
A: Given question is an example of nested if-else. If the condition is true, then, block of code inside…
Q: Draw a flowchart that accepts two numbers in the range of 0 to 99 and display the sum and difference…
A:
Q: Q1: Write an algorithm and draw a flowchart to calculate A1, A2, A3 from the following equation: Al…
A: As per our guidelines we are supposed to answer only one question. Kindly repost the remaining…
Q: You are given high of the cylinder (h) and radius of the cylinder base area (r) as in Figure 3(a)…
A: Please upvote. I am providing you the correct answer below. Please please please.
Q: In a triangle, the sum of the 1st and 2nd side must always be greater than the 3rd side. Create a…
A: Start input three sides (side1 + side2 > side3) && (side2 + side3 > side1) &&…
Q: Suppose x = 0, y = -1, and z = 1. What is the printout of the following statement? if (x > 0) if (y…
A: Given x=0, y=-1, z=1
Q: ate a Flowchart that will compute the real estate tax, given the following formulas: a. If value of…
A: I have given the c++ code for the given conditions below.
Q: Create a flowchart in which the program gets a number from user and checks If it's a multiple of 3.…
A: We need to create a flowchart. Where we take input from the user and check multiple conditions and…
Q: Use looping in creating a JAVA flowchart. Problem1. Create a flowchart from the given output. ***…
A: Note: As per guidelines, we are allowed to answer only one independent question per post. Kindly…
Q: Create a flowchart in which the program gets a number from user and checks if it's a multiple of 3.…
A: NOTE: AS per Bartleby guideline, if there are multiple questions available then we are allowed to…
Q: Draw a flowchart that shows how to evaluate the following expression, given that A = 1 and B = 3.…
A: The given expression is (A + 5) ^2 − (B + 4 * A). Since this expression requires to return only…
Q: 9.. Given two numbers X and Y, draw a flowchart to determine the difference between X and Y. If X- Y…
A: 9. Flowchart:
Q: 1. Write a flowchart that calculates the tax as follows: a) No tax if you get paid less than 10,000…
A:
Q: 1 Create a flowchart in which the program gets a number from user and checks if it's a multiple of 3…
A: Flowchart is used to define the pictorial representation of how the flow of code will be. It gives a…
Q: Perform action A when condition q1 is true, but not q2; otherwise, perform action B.
A: Perform action A when condition q1 is true, but not q2; otherwise, perform action B. q1 q2…
Q: turbo c++ program of You have a choice of 2 different auto mechanics with different rate…
A: As you have mentioned C++ program of the question, only program is written. The program is written…
Q: Write two scnr.nextInt statements to get input values into birthMonth and birthYear. Then write a…
A: Given: Write two scnr.nextInt statements to get input values into birthMonth and birthYear. Then…
Q: N=N-M 10-0 START A, B M = A N=B N = M N<M M = M-N N STOP f the inputted values to A and B are 115…
A: A flowchart is a type of diagram that represents a workflow or process. A flowchart can also be…
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: (a) If the number is positive, add the number to the variable positiveSum; (a) else, add the number…
A: A) The equivalent c++ code is if(number>0) { positiveSum+=number; } else if(number<0) {…
Q: Take 5 numbers from the user. Sum the first 4 numbers and subtract the last number from sum. Then,…
A:
Q: Create a flowchart in which the program gets a number from user and checks if it's a multiple of 3.…
A: According to our guidelines we solve only first one: ================================== We draw flow…
Q: What does the following flowchart do? Start set n to -1 is n less than 0? - No End Yes input n O…
A: in flowchart, rectangle is used for statement diamond is used for conditions. and start and stop are…
Q: Suppose x = 3 and y = 2; show the output, if any, of the following code. What is the output if x = 3…
A: Given: Suppose x = 3 and y = 2; show the output, if any, of the following code. What is the output…
Q: You have a choice of 2 different auto mechanics with different rate structures. One charges a flat…
A: #include <stdio.h> int main(void) { float t,min; scanf("%f",&t); printf("For time…
Q: 6. Suppose x = 3 and y = 2; show the output, if any, of the following code. What is the output if x…
A: 1) #include <iostream>using namespace std;int main(){ int x,y; cout<<"enter x: ";…
Q: Write two scnr.nextInt statements to get input values into birthMonth and birthYear. Then write a…
A: According to the Question below the Solution: Output:
Q1: Suppose x = 3 and y = 2. Show the output, if any, of the following code. What is the output if x = 2 and y = 3? What is the output if x = 4 and y = 4? Draw a flowchart of the code.
if (x < 2)
if (y < 2) {
int z = x + y;
cout<< “z is “ + z;
}
else
cout<< “x is “+ x;
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 8 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
- Analyze the following code: int x = 0;if (x > 0) ;{System.out.println(x);} The code has syntax error. The code has run time error. The value of variable x is always printed because the print statement is not controlled by the if condition. Nothing is printed because x > 0 is false if x = 0.-scripting language Write a program that randomly generates a lottery between 100 and 999 (random.randint(100, 999)), prompts the user to enter a number in the same range, and determines whether the user wins according to the following rule: (1) If the user input matches the lottery in exact order, print "the award is $10,000". E.g., lottery = 123, input = 123(2) If the user input matches the lottery, but in wrong order, print "the award is $6,000". E.g., lottery = 123, input = 321(3) If two digits in the user input matches a digit in the lottery, print "the award is $3,000". E.g., lottery = 123, input = 612(4) If one digit in the user input matches a digit in the lottery, print "the award is $1,000". E.g., lottery = 123, input = 289(5) If none of the digits is matched, print "thank you".Write aC++program that allows a user to enter their rating of the three movies in the DarkKnight Trilogy: Batman Begins/ The Dark Knight /The Dark Knight Rises Ratings must be between 1 and 5. If a rating entered is less than 1 or more than 5, display anappropriate message and do not use the rating. After all the ratings have been entered, display each rating entered, the highest rating, the lowest rating, and the average of the ratings.
- 3. The formula for determining compound interest is: A represents the amount to earn; P is the principle that is initially invested; r is the interest rate earned; n is the number of times the interest is compounded; and t is the number of time periods for the investment. Write a program that prompts the user to enter P, r, n and t. The program should output the amount earned on the investment. 4. Look up the Pythagorean theorem if you are not already familiar with it. Use the following formula to solve for c in the formula: c = √a2 + b2. Use the proper functions from the cmath header file. Be sure to output the result.l28. If originally x=4, what is the value of x after the evaluation of the expression: x+=4Q1: Draw a flowchart of the following code, and show the output if x = -3 and y = 3. int z 2.2; if(x 3) = X + y; if(z > -1){ cout <« "z is " + y; } else cout << "z is " + z;
- Draw the flowchart and write the equivalent code for the following problems: Marcy’s Department store is having a BoGoHo (Buy One, Get One Half Off) sale. The store manager wants a program that allows the salesclerk to enter the prices of two items. The program should both calculate and display the total amount the customer owes. The half-off should always be taken on the item having the lowest price. For example, if the items cost $24.99 and $10, the half-off would be taken on the $10 item;*2. Express the following Boolean expressions in simpler form; that is, use fewer operators. x is an in (d) !(x <= y)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.
- When you borrow money to buy a house, a car, or for some other purpose, you repay the loan by making periodic payments over a certain period of time. Of course, the lending company will charge interest on the loan. Every periodic payment consists of the interest on the loan and the payment toward the principal amount. To be specific, suppose that you borrow $1,000 at an interest rate of 7.2% per year and the payments are monthly. Suppose that your monthly payment is $25. Now, the interest is 7.2% per year and the payments are monthly, so the interest rate per month is 7.2/12 = 0.6%. The first months interest on $1,000 is 1000 0.006 = 6. Because the payment is $25 and the interest for the first month is $6, the payment toward the principal amount is 25 6 = 19. This means after making the first payment, the loan amount is 1,000 19 = 981. For the second payment, the interest is calculated on $981. So the interest for the second month is 981 0.006 = 5.886, that is, approximately $5.89. This implies that the payment toward the principal is 25 5.89 = 19.11 and the remaining balance after the second payment is 981 19.11 = 961.89. This process is repeated until the loan is paid. Write a program that accepts as input the loan amount, the interest rate per year, and the monthly payment. (Enter the interest rate as a percentage. For example, if the interest rate is 7.2% per year, then enter 7.2.) The program then outputs the number of months it would take to repay the loan. (Note that if the monthly payment is less than the first months interest, then after each payment, the loan amount will increase. In this case, the program must warn the borrower that the monthly payment is too low, and with this monthly payment, the loan amount could not be repaid.)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…B.Question The BITI Students Club is offering a new travelling package or membership. People can choose either one of three packages : a) business, b) family or single package. Each packages have different prices for monthly subscription. A business package is RM40, a family package is RM20 and single package is RM30. People can choose any package and duration-in-month for subscription. The program will calculate and display the total of payment. The program can be repeated as long as the option to exit is not selected. Any invalid input will result in an error message to retry. C) Sample Output BITI Caravan Travelling Club Membership 1. BUSINESS (RM40) 2. FAMILY 3. SINGLE 4. Quit the Program (RM20) (RM30) Enter your choice: 1 For how many months do you like to caravan with us ? 5 The total charges are RM200.e0 BITI Caravan Travelling Club Membership 1. BUSINESS (RM40) 2. FAMILY 3. SINGLE 4. Quit the Program (RM20) (RM30) Enter your choice:
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)