) You are tasked with calculating the cost of PCs for a new computer lab. Write a C++ program to: - Request and read in the required number, and net unit cost (OMR), of the PCs. - Calculate the total gross cost of the batch of PCs, after VAT has been applied at 5%. - Display the total gross cost
Q: I need a program in C++ I can't get any that I found, to actually run. A new author is in the…
A: Given data is shown below: A new author is in the process of negotiating a contract for a new…
Q: 15: Write C++ program to read x and compute sin, cos, and tan of x. Q16: Rewrite the equivalent…
A: // C++ program to read x and compute sin, cos, and tax of x. //include header for standard…
Q: Program C 5. Even Out by CodeChum Admin You know, I was lying when I said the last time that…
A: The C program along with the snapshot of code and output is given below.
Q: iv) Write a C++ program to input the three dimensions(in ft) of a cuboid-shaped room from the user…
A: The total surface area is painted and the two sides has to be printed The total surface area of a…
Q: e the following C++ code and determine the output. .5 + static_cast (7.4)/2; << x; ane of these
A: Here x is of integer data type
Q: e and cu
A: Code: #include<iostream>using namespace std;int main(){ int x,square,cube; cout <<…
Q: Choose the right statements to determine f in the following c++ program
A: Given: incomplete c++ program. Requirement: Complete the code. completed code with output is in…
Q: -Correct the folloWing C++ Program: #include Tio Const) a, b,co main() 7 cings as boc@ Y= a+b +C 8…
A: program: #include <iostream> using namespace std;float a,b,c;float y;int main(){…
Q: State the order of evaluation of the operators in each of the following C statements andshow the…
A: Answer of the given question: Here is the step by step solution of every question: Answer (a) x = 7…
Q: Q1/ Write a C++ program to calculate the volume of a sphere V, where the volume can be found using…
A: Formula Used: Volume of sphere(V)=43(πR3) Algorithm: Define the value of PI to 3.14 Input the…
Q: Problem – 4: Write, compile, and run a C++ program to perform one of the following tasks for the two…
A: Here the program calculating the slope of line formed by the two points Start input two points…
Q: 3. Marry has planned to do build a wall of height 2m around her rectangular garden. The cost of…
A: The total cost of building complete wall = Area of complete wall * Rate per m2 Area of complete…
Q: You are tasked with calculating the cost of PCs for a new computer lab. Write a C++ program to:…
A: Required:
Q: Examine the following C++ code and determine the output. int x=7,y-5; x+- y; y =+x+y++; cout << x <<…
A: The Answer is
Q: iii) How many days will a user require to collect x points if he gets 1 point every day and on the…
A: According to the information given:- We have to follow the instructions in order to get the desired…
Q: Write a C++ program based on the following requirements: -Function main will accept two numbers and…
A: Use an if ladder to check for the operator and return respective value
Q: Write a statement (or comment) to accomplish each of the following: c) Define the variables x, y and…
A: 1) The syntax for declaring integer variables is int variable_name1 [= value1]; variable_name1 is…
Q: Q2// write a C++ program that calculate the arca of cirele?
A: Q2. Algorithm: 1. Start 2. Read radius 3. Calculate area=3.14*radius*radius 4. Print area 5. Stop
Q: Program C 3. Loading… by CodeChum Admin I wanna experiment on looping through a range of numbers…
A: The C code along with the snapshot of code and output is given below.
Q: (b) Write a code in C program to solve the following quadric equation:
A: I have provided a solution in Step 2.
Q: Write C++ statement(s) to accomplish each of the following tasks: (i) Declare 2 integer variables, x…
A: C++is an operating system which is an open source. It is a software which helps in managing the…
Q: Code, compile and execute a C++ program that accepts the x and y coordinates of two points. The…
A: Read the value of x1 and x2 and the value of y1 and y2 . Find the value Xm and Ym by using the…
Q: I need help in coding the following practice problem using the fundamentals of C Programming…
A: I need help in coding the following practice problem using the fundamentals of C Programming…
Q: PROVIDE CODEWrite a c++ program accepting a complex number. Overload the required operators to…
A: #include<iostream>using namespace std; class complex { int real, img; public:…
Q: Write a single C statement or line that accomplishes each of the following:d) Input three integer…
A: The answer is...
Q: 1- write a c program to process weekly employee time cards for all employees of an organization…
A: As per the guidelines we are supposed to answer only one question. Kindly repost other questions as…
Q: Write a C program to find the result of the following formula with the following conditions. a, b…
A: Required: Required code with comments for explanation and screenshot of both code and output has…
Q: a) Explain the purpose of using loops, what are the types of loops in C++, write down their syntax,…
A: Here, I have to provide a solution to the above question.
Q: 18 kg of sugar water with a sugar ratio of 45% and 100 kg of sugar water with a sugar ratio of 55%…
A: Hello Student. Greetings from my side. Hope you are doing great. Thank You !!!
Q: Write a program in C++, using case statements, that mimics a calculator. The program should take as…
A:
Q: Note: C++ Programming Answer Required The annual snake festival is upon us and all the snakes of the…
A: Algorithm: The first line contains a single integer, R, which denotes the number of reports to be…
Q: You are tasked with calculating the cost of PCs for a new computer lab. Write a C++ program to: -…
A: C++ program to calculate the cost of the PCs for a new computer lab. Prompt the user to enter the…
Q: 2. Write a C++ program and code the functions given below, also test the functions taking the value…
A: Write a C++ program and code the functions given below, also test the functions taking the value of…
Q: Write a C++ code to print the Tribonacci Series. Take the number of terms from user. Please explain…
A: Below is the code in C++ language. Basically, Tribonacci series is the sum of the previous three…
Q: Write a C statement to accomplish each of the following tasks.e) Print "The sum is: " followed by…
A: Answer: Approach 1. Declare the variable sum 2. Ask user to enter the value of sum 3. Scan the input…
Q: B. Your Computer Science assigned a task to you. Your task is to develop a C program to read a…
A: As per the company guidelines we are supposed to answer only one question. Algorithm Step 1: Start…
Q: Design, write and compile, and run a C++ program to convert temperature in degrees Fahrenheit to…
A: Write a program using C++ language which takes an input(temperature in fahrenheit) and convert it…
Q: Final Assignment: Write a C code using "method m to determine and print the value of x for the…
A: #include<stdio.h>#include<stdlib.h>#include<math.h>using namespace std; #define…
Q: Problem 2: When a particular rubber ball is dropped from a given height (in meters), its impact…
A: Algorithm: step1: take height and g value from user(for both moon and earth case separately)…
Q: create a program to output all even numbers from 2 to 40, use simple iostream input/output commands…
A: Loop running from 2 to 40 Print number Add number to sum Increment count by 1…
Q: Write a C statement to accomplish each of the following tasks.b) Set variable x to 1
A: Here we have a variable x and it needs to be set to value 1.
Q: I need Help again understanding C++ programming with a problem: Assume an equation is in the…
A: EXPLANATION: Given formula is “ax+b=c”, to compute the value of x, formulate the given formula to…
d) You are tasked with calculating the cost of PCs for a new computer lab. Write a C++
- Request and read in the required number, and net unit cost (OMR), of the PCs.
- Calculate the total gross cost of the batch of PCs, after VAT has been applied at 5%.
- Display the total gross cost
Step by step
Solved in 2 steps with 2 images
- -Program C 2. Not my Favorites by CodeChum Admin We've already done looping through a series of numbers and printing out its squares, so how about we level it up and go with cubes this time? I have a condition though; I don't want to be associated with numbers that are divisible by 3 or 5 so if an integer is divisible by either of the two, don't make their cube values appear on the screen, please. Care to fulfill my request? Instructions: Print out the cube values of the numbers ranging from 1 to 1000 (inclusive). However, if the number is divisible by either 3 or 5, do not include them in printing and proceed with the next numbers. Tip: When skipping through special values, make use of the keyword continue and put them inside a conditional statement. Output Multiple lines containing an integer. 1 8 64 343 512 . . .(Electrical eng.) The amplification of electronic circuits is measured in units of decibels, which is calculated as the following: 10LOG(Po/Pi) Po is the power of the output signal, and Pi is the power of the input signal. Using this formula, write, compile, and run a C++ program to calculate and display the decibel amplification, in which the output power is 50 times the input power. Verify your program’s result by doing a hand calculation. After verifying that your program is working correctly, use it to determine the amplification of a circuit, where output power is 4.639 watts and input power is 1 watt.(General math) The perimeter, approximate surface area, and approximate volume of an in-ground pool are given by the following formulas: perimeter=2( length+width)volume=lengthwidthaveragedepthundergroundsurfacearea=2( length+width)averagedepth+lengthwidth Using these formulas as a basis, write a C++ program that accepts the length, width, and average depth measurements, and then calculates the pool’s perimeter, volume, and underground surface area. In writing your program, make these two calculations immediately after entering the input data:lengthwidthandlength+width. The results of these two calculations should be used as needed in the assignment statements for determining the perimeter, volume, and underground surface area without recalculating them for each equation. Verify your program’s results by doing a hand calculation, using the following test data :length=25feet,width=15feet,andaveragedepth=5.5feet. After verifying that your program is working, use it to complete the following chart:
- (Electrical eng.) For the series circuit shown in Figure 3.16, the voltage drop, V2 , across resistor R2 and the power, P2 , delivered to this resistor are given by the formulas V2=IR2andP2=IV2,whereI=E/(R1+R2). Using these formulas, write, compile, and run a C++ program that prompts users for values of E, R1, and R2 ; calculates the voltage drop and power delivered to R2 ; and displays the results. Check your program by using the test data E=10volts,R1=100ohms,andR2=200ohms. After finishing your verification, use your program to complete the following chart:-Program C 5. Even Out by CodeChum Admin You know, I was lying when I said the last time that numbers associated with 3 are my favorite, because the one I actually like the most in the world are even numbers! But to make things harder for you, you have to pick the even numbers from a range of two given numbers. Ha! Now, let's try this one more time! Instructions: Input two integers in one line, separated by a space. The first integer shall represent the starting point, and the other, the ending point. Print out all even numbers that are within the range of the starting and ending point (inclusive or including the ending point). Input 1. The starting point 2. The ending point Output The first line will contain a message prompt to input the starting point. The second line will contain a message prompt to input the ending point. The last line contains the integers within the range. Enter·the·starting·point:·5 Enter·the·ending·point:·10 6·8·10(Hydraulics) a. Design, write, compile, and run a C++ program that calculates and displays the velocity of water flowing out of the tube shown in Figure 2.19. The velocity of water flowing into the tube is 1 ft/sec, the input tube radius is 0.75 in, and the output tube radius is 0.5 in. The output velocity is given by this formula: vout=vin( r in r out )2 v outistheoutputvelocity.v inistheinputvelocity.routistheradiusoftheoutputtube.r inistheradiusoftheinputtube. b. Manually check the values computed by your program. After verifying that your program is working correctly, modify it to determine the output velocity for a tube having an input radius of 1 in and an output radius of .75 in, when water is flowing into the tube at a rate of 1.5 ft/sec.
- 2. State the values of the control variable x that are printed by the following “for” statement. Then change the code to C++ syntax, and write a complete program in C++ syntax using the code block shown below, run the program, then capture the screen and submit it. for (x = 5; x <= 22; x += 7) { printf("%u\n", x); }QUESTION 2 Construct a C code to compute, to display the sum of five (5) integer numbers and determine the biggest and smallest number. (*apply appropriate library/header.)(General math) a. A balance has the following weights: 100 lb, 50 lb, 10 lb, 5 lb, and 1 lb. The number of 100 lb and 50 lb weights required to weigh an object weighing WEIGHT pounds can be calculated by using the following C++ statements: //Determinethenumberof100lbweightsw100=int( WEIGHT/100)//Determinethenumberof50lbweightsw50=int( ( WEIGHTw100100 )/50) Using these statements as a starting point, write a C++ program that calculates the number of each type of weight needed to weigh a 789 lb object. b. Without compiling or running your program, manually check the effect of each statement in the program and determine what’s stored in each variable as each statement is encountered. c. After verifying that your algorithm works correctly, compile and run your program. Verify that the results your program produces are correct. After verifying that your program is working correctly, use it to determine the weights required to weigh a 626 lb object.
- Problem 1 (#2.1.8). Determine whether these statements are true or false. a) ∅ ∈ {∅} b) ∅ ∈ {∅,{∅}} c) {∅} ∈ {∅} d) {∅} ∈ {{∅}} e) {∅} ⊂ {∅,{∅}} f) {{∅}} ⊂ {∅,{∅}} g) {{∅}} ⊂ {{∅},{∅}}General math) a. Write a C++ program to calculate and display the midpoint coordinates of the line segment connecting the two endpoints given in Exercise 1a. Use the fact that the coordinates of the midpoint between two points with the coordinates x1,y1)and(x2,y2)are((x1+x2)/2,(y1+y2)/2). Your program should produce the following display (replacing the underscores with values your program calculates): ThexmidpointcoordinateisTheymidpointcoordinateis b. How do you know the midpoint values your program calculates are correct? c. After verifying the output your program produces, modify it to determine the midpoint coordinates of the line connecting the points (2,10) and (12,6). d. If your program doesn’t already do so, change its output to this: The x coordinate of the midpoint is xxx.xx The y coordinate of the midpoint is xxx.xx The xxx.xx denotes placing the calculated value in a field wide enough for three places to the left of the decimal point and two places to the right of it.(Electrical eng.) a. The voltage gain of an amplifier is given by this formula: voltagegain=[275 23 2 +0.5 f 2 ]n f is the frequency in Hz. n is the number of stages in the amplifier. Using this formula, write, compile, and run a C++ program to determine the value of the voltage gain for a four-stage amplifier operating at a frequency of 120 Hz. Your program should produce the following display: At a frequency of xxxxx hertz, the voltage gain is yyyyy Your program should replace xxxxx with the frequency and yyyyy with the voltage gain. b. Manually check the value your program produces. After verifying that your program is working correctly, modify it to determine the voltage gain of a 12-stage amplifier operating at a frequency of 9500 Hz.