Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Program all 3 please ! Below is a sample Java program that reads a number from the keyboard and then displays it on the screen.

image text in transcribed image text in transcribed Program all 3 please !

Below is a sample Java program that reads a number from the keyboard and then displays it on the screen. Use this template to write the following programs /* Example program showing simple input and output. */ public class TestExp { public static void main (String[] args) { /*Create a Scanner object to read data from the keyboard */ java util Scanner keyboard = new java util. Scanner (System.middotin): double myVar: //declare input variable System.out.println("Enter a number") //display prompt myvar = keyboard. nextDouble (): //get a number from the keyboard System.out.println ("The number is "+myVar): //display the number } } Write a program that converts liters to gallons. There are 3.78541 liters in a gallon. Input the number of liters and display the number of gallons. Example: For an input of 10.0 liters, the answer is 2.6417217685798895 gallons. Write a program that calculates the amount of latex required to make a balloon of a given diameter. Assume the balloon walls are 0.25 millimeters in thickness when inflated. The program inputs the diameter of the balloon in centimeters and displays the amount of latex is cubic centimeters using the equation: latex = 0.025 pi 4 (diameter/2)2 Example: A 30.0 cm diameter balloon will require 70.68583470577035 cc of latex Write a program that reads in the length of an edge of a tetrahedron and displays its volume, which can be computed from the equation: volume = edge^3/6 Squareroot 2 Example: For a tetrahedron whose edge is 4.0, the area is 7.542472332656506

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases And Python Programming MySQL MongoDB OOP And Tkinter

Authors: R. PANNEERSELVAM

1st Edition

9357011331, 978-9357011334

More Books

Students also viewed these Databases questions

Question

Please write and explain the MATLAB code. Thanks!

Answered: 1 week ago