#include <iostream>
using namespace std;
int main() {
double r = 1.67;
double volume = 4 * (22.0/7.0) * (r*r*r) / 3;
cout << volume;
}
// Output: 19.517
of 3,5 in and a height of 1.45 in. 2 (General math) a. Design, wrire, compile,...
Nay programming languge is fine (MatLab, Octave, etc.) This is the whole document this last picture i sent is the first page 5. Write and save a function Sphere Area that accepts Radius as input argument, and returns SurfaceArea (4 tt r) as output argument. Paste the function code below. Paste code here 6. Validate your Sphere Area function from the command line, checking the results against hand calculations. Paste the command line code and results below. 7. Design an...
This is for Pycharm a python course. Can I get some help doing this and understand it? ⑤ : ib tps://canvas.pasadena.edu/courses/1032754/assi a ☆ 西%N m Crowfall. Th O computing, with-c- O PHP Tutorial | SoloL ontoja. on tojav.. Write functions . def main) . def sphereVolume(r) . def sphereSurfacelr) def cylinderVolumetr. h) . def cylinderSurface(r, h) . def coneVolumefr, h) . def coneSurface(r, h) ences rations main() # call amin function at teh end In the main display, a menu...
Write a C++ program to compute the total volume of N cones, where N is a number entered by the user. Repeat the request for N until the user enters a positive number. For each cone, ask for the radius and height, compute the volume, and add that volume to the total. Each time you ask the user to enter either the height or the radius, if the user does not enter a positive number, display an error message and...
package _solution; /** This program demonstrates how numeric types and operators behave in Java Do Task #1 before adding Task#2 where indicated. */ public class NumericTypesOriginal { public static void main (String [] args) { //TASK #2 Create a Scanner object here //identifier declarations final int NUMBER = 2 ; // number of scores int score1 = 100; // first test score int score2 = 95; // second test score final int BOILING_IN_F = 212; // boiling temperature double fToC;...
In Java Exercise #2: (Java) Design and implement a program (name it ComputeAreas) that defines four methods as follows: Method squareArea (double side) returns the area of a square. Method rectangleArea (double width, double length) returns the area of a rectangle. Method circleArea (double radius) returns the area of a circle. Method triangleArea (double base, double height) returns the area of a triangle. In the main method, test all methods with different input value read from the user. Document your...
iIn python please AutoSave H L04-3b Testing Lab - Protected View - Saved to this PC- Search A [email protected] J 7 File Home Insert Draw Design Layout Share Comments References Mailings Review View Help Areas and Volumes We'll write a program that prompts the user for a radius and then prints: a) The area and circumference of a circle with that radius b) The volume and surface area of a sphere with that radius 1. To get started, what is...
(a) Figure 2 shows a cuboid and a cone (not drawn to scale). Edge AB has length 26 cm, and the diagonal AC has length 42 cm. The radius r of the cone is 12 cm, the height h is 16 cm and the slant height l is 20 cm. D 26 cm B 1= 20 cm h=16 cm 42 cm r= 12 cm Figure 2 Give your answers to each of the following to two significant figures. (1) Find...
2. (aj An object thrown vertically with a speed vo reaches a height h at time t,where with a user defined function that computes the time required to reach a Write a MATLAB program specified height h, for a given value of vo. The function's imput should be h, we and g Testverurtrott" for the case where h-100 m, vee50 m/s and g-9,82 /by free hand. Write the MATLAB you will run/call the function with these given values (b) Write...
2. (a) An object thrown vertically with a speed vo reaches a height h at time t, where: he vot tgt Write a MATLAB program with a user defined function that computes the time required to reach a specified height h, for a given value of vo. The function's input should be h, Vo, and g. Test your function for the case where h 100 m, Vo-50 m/s and g9,81 m/s2 by free hand. Write the MATLAB command how you...
Create a code that performs the following actions: l. Define the flow rate and height of tank 2./ Have the user input a value for radius 3./ Ask the user for a value of many minutes the tank should fill for 4. Clear the command window (clc) after all of the input commands are given 5. Call in a "tank solver" function that performs the following Takes F, h, r, and t final as inputs, and there are no variable...