(General math) The volume of oil stored in an underground 200-foot deep cylindrical tank is determined by measuring the distance from the top of the tank to the surface of the oil. Knowing this distance and the radius of the tank, the volume of oil in the tank can be determined by using this formula:
Using this information, write, compile, and run a C++
Trending nowThis is a popular solution!
Chapter 3 Solutions
C++ for Engineers and Scientists
- (MIPS/MARS programming) Write a Program that initialize 4 by 4 Table and find the Maximum number in the table and prints the value, the row number and the column number of that maximum number.arrow_forward(CP) Write a program that reads in an m by n matrix (m row by n column), then reads in an n by p matrix (n row by p column), and then computes the product matrix and displays the two matrices as well as their product matrix on the screen.arrow_forward(C PROGRAMMING ONLY!) Your task is to fill in the blank with the correct condition. 5. Finding the Impostorby CodeChum Admin There's this Dog game I played where a group of Dogs gather together and complete missions. One of them though is an impostor because it is not a real dog; its breed is not a dog breed. Your task is to find that impostor. To do this, you need to check Instructions: In the code editor, you are provided with the enum, DogBreed. Furthermore, an initial main() code is provided for you where the user is asked for what the breed of the Dog.Then, in lines 18 - 22, a partial code to check if the breed is valid or not is given.Your task is to fill in the blank with the correct condition. Make sure to use the values of the enum, DogBreed in checking. Input 1. Dog Breed Output Input the breed of the dog: 2Yup, the breed is validarrow_forward
- (MIPS/MARS programming) Write a Program that initialize the 4 by 4 table and prints the table Then your program should doubles the diagnol elements of the table and prints the entire table with new values.arrow_forward(PYTHON PLEASE) Also I was made aware that I can only ask one question and this question requires four different programs so please provide code for Pattern C. Thank you. (Display four patterns using loops) Use nested loops that display the following patterns in four separate programs:arrow_forward(use Python)Given pre-defined variables start and stop which are both assigned to ints, use a while loop to sum the integers between start (inclusive) and stop (exclusive) and display the result. Note: You may assume that start will be less than stop.arrow_forward
- (Use Python) The function course_average should calculate and return the average of the three values pass to it. The function main should ask the user to enter three grades and then pass these values to the course_average function. This function should also display a message to the user in the format below. For example, if the user entered 100, 90 and 95 the message would be:The average of 100 , 90 and 95 is 95arrow_forward(using C) print the following pattern on the screen usingloops. You are only allowed to use a maximum of 2 loop constructs ccccc 3333 bbb 22 aarrow_forward(Use Dev++) Write a program that finds the day of the week for any given date using Zeller’s congruence. Zeller found the following formula to calculate the day of the week using the day of the month, the month, and the year. weekday = (day + 26 * (month + 1) / 10 + year + year / 4 − year /100 + year /400 ) % 7; The formula is based on the following: There are seven days in the week so the calculation must be done modulo 7. The first term, day, shows that each day of the month moves the weekday forward by 1. The second term, 26 * (month + 1) / 10, is the Zeller congruence. Instead of worrying about the number of days in each month, Zeller devised this solution. Zeller’s formula works for a solar system when the year starts from March, not January. Therefore, we must consider the months January and February as months13 and 14 of the previous year. In other words, January of 2017 must be considered as month 13 of year 2016. The next term, year, moves the week day one day for each year…arrow_forward
- (QUESTION) Using the required programming language (python, matlab, etc.) plot the variation of pressure on the piston surface as a function of time until the piston moves 9 m, with the help of the following commands below. This problem will be solved for U_p =1, 4, 16, 64, 256 m/s. We'll assume that the time starts at t = 0 when the piston starts moving. (PLEASE TAKE A SCREENSHOT OF THE PLOTTING AND OTHER RESULTS.) Note: Since we don't have the exact time intervals or the rate at which the piston moves, we'll assume a constant speed and divide the distance by the speed to get the time taken. (QUESTION) COMMANDS import matplotlib.pyplot as plt import numpy as np # Given parameters diameter = 0.1 # meters length = 10 # meters initial_pressure = 10e3 # Pascals initial_temperature = 288 # Kelvin # Convert diameter to radius radius = diameter / 2 # Calculate initial and final volumes initial_volume = np.pi * radius**2 * length final_volume = np.pi * radius**2 * (length - 9) # Calculate…arrow_forward1. (Floating-Point Arithmetic). For each of the following numbers,(a) determine whether the number is a 4-digit oating-point number (the number of the FPA4);(b) if yes, write the number in the standard form ±0.d1d2d3d4 × 10n, where d1 is a nonzero digit and n ∈ Z;(c) if no, rst chop and then round the number to a number of the FPA4, written in the standard form:(i) − 0.989067000000001; (ii) − 51.8; (iii) − 900.377050000001; (iv) − 5000.0;(v) − 0.023409; (vi) 2036.0; (vii) 0.01814.arrow_forward(Do it on R) Please find and solve the attached problem belowarrow_forward
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr