What is the printout of the code in (a) and (b) if number is 30? What if number is 35?
Q: Rewrite the code by using (IF) Instead of (Select case)
A: Private Sub Form_Activate() Font.Name = "arial":Font.Size = 14: Font.Bold = True start: k =…
Q: How can I print the percentage % character in C language because when I am trying to print it using…
A: Show how to print the percentage(%) character in C language using the printf() function.
Q: Develop a flow-chart to print the square of all numbers from 0 to 10
A: The flowchart to print the squares of all the numbers from "0" to "10" is as follows,
Q: Please watch the Week#8 class lecture for the Boolear expression and complete the truth table for…
A: Here in this question we have given a boolean circuit and we have asked to find truth table for this…
Q: The __________ library function returns the sine of an angle.
A: C
Q: The following print code is to find out the ASCII code, character for the decimal codes,and…
A: ASCII chart is shown on the board
Q: . If we change the statement calc(x, y); to calc(1, 3) in the program, explain why would be an…
A: Define header file <iostream> which has the i/o operation files Define method calc with…
Q: Check and. Fix the code answer along with output
A: To do: Fix the given code
Q: What would happen to the Factorial program’s output if you tried to calculate 13!?
A: Code: The below program is used to calculate the factorial of the given number: #include…
Q: Please write with simple codes
A: GIVEN: we have to make a guess number program for randomly picking words and play it until user…
Q: Evaluate the postfix expression:5 6 2 ^ 2
A: Scan items from expression. If it is operand put it into stack. If it is operator pop two top…
Q: Write Pseudocode to find the result of equation
A: Pseudocode is step by step process to solve the problem
Q: a- Write code to find the sum of even number between 1 to 100 for the first 10 numbers, then for the…
A: Find the required code given as below and output:
Q: Analyze the code below: for i in range(1, 1): for j in range (1, 2): print( 3, end= 4
A: i represents the row and j represents number of #'s that has to be printed in each line # is printed…
Q: Explain three things you can attempt if you've gone through the debugging procedure and stil can't…
A: Start: As we all know, there is no one-size-fits-all solution to fixing all of your code's flaws,…
Q: Please reduce the λ expression so that it is in normal form: (λa.a(λa.b a)) (λc.c
A: According to the question we need to: Reduce the λ expression so that it is in normal form:
Q: What is the value of the postfix expression 6 324 + -*
A: A post fix expression is a collection of operators and operands in which the operator is placed…
Q: a- Write code to find the sum of even number between 1 to 100 for the first 10 numbers , then for…
A: Find the required code given as below and output: As per company guidelines we are supposed to…
Q: Convert the infix expressions into the equivalent postfix form. (A + B ⋀D)/(E – F)+G
A: Question. Convert the infix expressions into the equivalent postfix form. (A + B ^ D)/(E – F)+G
Q: To write the contours of the surface at X,y,z we write the code :
A: According to the question we need to write the contours of the surface at x,y,z we write the code.
Q: What is the echo statements for the kitties, please provide the output of the kitties of the echo…
A: Since there is no echo statements for kitties, I am taking an assumption that kitties is cat command…
Q: D-Flipflop B, and Output. Please enter the equations in the space provided. AB XY/Z 00 01/0, 00/1…
A: Truth table for the given diagram:
Q: How do you obtain the current second, minute, and hour?
A: To obtain current second, minute, and hour in Java.
Q: Which input for variable c causes "Done" to be output next?
A: This is very simple. The correct answer is option B) Any value other than 'y'…
Q: What is the postfix form of the expression ((x + y) ^ 2) + ((x − 4)/3)? *
A: Infix form: in this operator comes between operandsexample: X+Y Prefix form: in this operator comes…
Q: Write JAVA code, which prints factorial of given number.
A: Let First know about the concept of factorial : Factorial of a non-negative integer, is…
Q: How many times is the variable x read?
A: In the above code, the variable i is initialized to 0 and using the do loop. In the do loop, the…
Q: What is the likelihood of an error in the REpitition code, also known as the Huffman code?
A: Introduction: Huffman coding is primarily a data compression method.
Q: write c++ code to print full pyramid using "+" symbol
A: C++ code to print full pyramid using "+" symbol.
Q: The following code displays the value 33
A: False Answer is 1
Q: Input any character and check whether it is alphabet, digit or special character. use switch-case…
A: This program is made using C++. It takes user input which will be of character data type. This input…
Q: Assume that n is 9 and k is 7. Which of the Boolean expressions are true?
A: n = 9 and k = 7 1. ! ( 0 >= n && n <= k) ! ( 0 >= 9 && 9 <= 7) !…
Q: What is output by the code below? for x in range(5): print("Hi", end = " ") II 11 %3D
A: Hi Hi HI Hi Hi
Q: The snippet that has to be used to check if “a” is not equal to “null” is _________ i) if(a!=null)…
A: The not-equal operator !== compares o to null and evaluates to either true or false.
Q: The following print code is to find out the ASCII code, character for the decimal codes,and…
A: The algorithm would involve converting the input integer to character using casting operator as…
Q: Fill in the blanks in the given code such that it prints the variable I only if i is less than 6.
A: Complete the given JAVA code to print the variable i in the output only if the value of i is less…
Q: In our lab computers, if we want to go on the safe mode, we must press the function key of
A: Required:
Q: What is the value of the expression ch >= 'A' and ch <= 'Z' if ch is 'A', 'p','E', or '5'?
A: Step 1:- Program Approach:- 1.Initialize the variable ch 2.print result of the expression Every…
Q: What is the output x, y and z for the following
A: In this question, we are asked to write the output of the given program Given:
Q: bool AND(int input1, int input2){ //return the logical AND of both the inputs without using '&'…
A: Complete the given C++ function to calculate the logical AND of two given inputs. Given Function:…
Q: If the entire postfix expression is [9, 12, -4, +, , 4, 1, what is the final value?
A: A post-fix expression is a collection of operators and operands in which the operator is placed…
Q: What is the Probability of error in REpitition code,huffman code.
A: Huffman code for the most part is a method used for information compression. Huffman algorithm…
Q: (b)
A: Here in this question we have given a finite automata .and we have asked to find regular expression…
Q: take the input from the user. if its postfix expression convert it into prefix and infix if its…
A: Infix articulationAn infix articulation is an articulation where administrators (+, - , *,/) are…
Q: Write a program which calculates area of the ring using call by reference approach
A: CODE:- void area_of_circle(float *value, float *result){ *result = 3.14 * (*value) * (*value);}…
Q: working
A: Answer has been explained below:-
Q: Write the postfix form of the expression: (A+B)*(C*D-E)*F/G
A: Question. Write the postfix form of the expression: (A+B)*(C*D-E)*F/G
Step by step
Solved in 3 steps
- For this assignment, write a program named PizzaPrices that prompts the user to make a choice for a pizza size - S,M, L, or X - and the number of pizza the user wants to order. The price for different size pizzas are $6.99, $8.99, $12.5, and $15.0 respectively. There is also a discount based on the number of pizza ordered: no discount for one pizza, 10% discount for 2 pizzas, 15% discount for 3-5 pizzas, and 20% for more than 5 pizzas. Display a full accounting of the transaction, similar to the sample screenshot. Please make sure you use parallel arrays and range match in your solution.You are working for a lumber company, and your employer would like a program that calculates the cost of lumber for an order. The company sells pine, fir, cedar, maple, and oak lumber. Lumber is priced by board feet. One board foot equals one square foot that is one inch thick. Theprice per board foot is given in the following table: Pine 0.89Fir 1.09Cedar 2.26 Maple 4.50Oak 3.10 The lumber is sold in different dimensions (specified in inches of width and height, and feet of length) that need to be converted to board feet. For example, a 2 x 4 x 8 piece is 2 inches wide, 4 inches high, and 8 feet long, and is equivalent to 5.333 board feet (2 * 4 * 8 = 64, which when divided by 12 = 5.333 board feet). An entry from the user will be in the form of a letter and four integer numbers. The integers are the number of pieces, width, height, and length. The letter will be one of P, F, C, M, O (corresponding to the five kinds of wood) or T, meaning total. When the letter is T, there are no…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.)
- Write a c++ Develop a version where the player makes bet. If the Player guesses the first time, the player wins 10 times his initial bet If the Player guesses the number after 2 tries, he losses. 10 times his initial bet.press# to exit. Code and output with explanation.Write a code for craps game. Craps is a dice game in which the players make wagerson the outcome of the roll, or a series of rolls, of a pair of dice.The rules of the dice game craps are as follows:You roll two dice. Each die has six faces, which contain one, two, three, four, five and six spots,respectively. After the dice have come to rest, the sum of the spots on the two upward faces iscalculated. If the sum is 7 or 11 on the first throw, you win and play is over. If the sum is 2, 3or 12 on the first throw you lose and play is over. If the sum is 4, 5, 6, 8, 9 or 10 on the firstthrow, that sum becomes your “point.” To win, you must continue rolling the dice until you“make your point” (i.e., roll that same point value). You lose by rolling a 7 before making yourpoint(in python)Write a code for craps game. Craps is a dice game in which the players make wagerson the outcome of the roll, or a series of rolls, of a pair of dice.The rules of the dice game craps are as follows:You roll two dice. Each die has six faces, which contain one, two, three, four, five and six spots,respectively. After the dice have come to rest, the sum of the spots on the two upward faces iscalculated. If the sum is 7 or 11 on the first throw, you win and play is over. If the sum is 2, 3or 12 on the first throw you lose and play is over. If the sum is 4, 5, 6, 8, 9 or 10 on the firstthrow, that sum becomes your “point.” To win, you must continue rolling the dice until you“make your point” (i.e., roll that same point value). You lose by rolling a 7 before making yourpoint.
- C++, How do I write a program that asks how many tickets for each class of seats were sold, then displays the amount of income generated from ticket sales? Class A costs $15, Class B costs $12, and class C costs $9.You are working for a lumber company, and your employer would like a program that calculatesthe cost of lumber for an order. The company sells pine, fir, cedar, maple, and oak lumber.Lumber is priced by board feet. One board foot equals one square foot that is one inch thick. Theprice per board foot is given in the following table: (image 1) The lumber is sold in different dimensions (specified in inches of width and height, and feet oflength) that need to be converted to board feet. For example, a 2 x 4 x 8 piece is 2 inches wide, 4inches high, and 8 feet long, and is equivalent to 5.333 board feet (2 * 4 * 8 = 64, which whendivided by 12 = 5.333 board feet). An entry from the user will be in the form of a letter and fourinteger numbers. The integers are the number of pieces, width, height, and length. The letter willbe one of P, F, C, M, O (corresponding to the five kinds of wood) or T, meaning total. When theletter is T, there are no integers following it on the line. The program…Question # 8: Write a program that inputs a number and checks whether it is a perfect number or not. A perfect number is the number that is numerically equal to the sum of its divisors. For example, 6 is a perfect number because the divisors of 6 are 1, 2, 3 and 1+2+3=6
- Give an example in which passing an argument by reference would be useful.In C++ , Write a program for a Bookstore to take an order from a customer, calculate how much to charge a customer based on his/her order, and display a receipt. The store sells only three books, designated by their authors: Cervantes ($41.25 each), Homer ($15.85 each), and Shakespeare ($30.50 each). Your program is to work as follows: Display a welcome message (e.g., “Welcome to the Bookstore!”) Prompt the user for his/her first name Prompt the user to input the number of books by Cervantes s/he wants Prompt the user to input the number of books by Homer s/he wants Prompt the user to input the number of books by Shakespeare s/he wants Compute the total amount due, including a 10% sales tax Display amount due Ask the user how much money s/he will pay Display a receipt listing the name of the user, the quantity of each item ordered, the total cost of the order, and the amount the user will have left after paying Execution of the compiled program should appear roughly as follows…In your favorite open world adventure video game, currency conversion is as given below: 1 Gold coin 23 Bolts 1 Gem 13 Gold coins Write a program that takes a number of Bolts as user input (as an integer) and converts it to the number of whole Gems, Gold coins, and Bolts as shown below. The conversion information between these measurement metrics is provided in the table above. The number of Bolts should be converted in such a way that maximizes the whole number of Gems and Gold coins. Expected output 1 (bold is user input) Enter the number of Bolts: 32 0 Gems(s) 1 Gold coin(s) 9 Bolt(s) Expected output 2 (bold is user input) Enter the number of Bolts: 3000 10 Gem(s) 0 Gold coin(s) 10 Bolt(s) The file should be named as convertCurrency.cpp. Don’t forget to head over to Coderunner on Canvas and paste your solution in the answer box!