Computer Science, asked by ishaqueidrisgmailcom, 1 day ago

write a menu drive program to calculate and print volume of sphere, volume of cylinder,volume of cone according to user choice volume of sphere-4/3 r², volume of cylinder-r²h, volume of cone 1/3 r²h​

Answers

Answered by Renumahala2601
0

Answer:

Mind's are like parachute they only function when they are open

Explanation:

☘️ Science is the human effort to understand the history of the natural world and the working of the natural world with observable physical evidence. In this article, we will be discussing more science, its subcategories, and most importantly the origin and history of science.

☘️ Science is the intellectual and practical activity comprised of the systematic study of the structure and behavior of every natural and physical object and phenomena through observation and experiment. In simple terms, Science is knowledge of nature. Science can be defined as:

The observation, identification, description, experimental investigation, and theoretical explanation of natural phenomena.

Basic Science can be subdivided into three types :

Natural Sciences – The study of the material world

Social Sciences – The study of people and societies

Formal Sciences – Like Mathematics\large{ \green{ \bold{ \underline{ \underline{ \overline{ \overline{ \pink{hope \: this \: helps \: you \: \: ✌}}}}}}}}

Answered by kalpnajha1986kp
3

Answer:

your answer is here dear mate :-

KnowledgeBoat Logo

Computer Applications

Write a program using switch case to find the volume of a cube, a sphere and a cuboid.

For an incorrect choice, an appropriate error message should be displayed.

Volume of a cube = s * s *s

Volume of a sphere = (4/3) * π * r * r * r (π = (22/7))

Volume of a cuboid = l*b*h

Java

Java Conditional Stmts

ICSE

17 Likes

ANSWER

import java.util.Scanner;

public class KboatMenuVolume

{

public static void main(String args[]) {

Scanner in = new Scanner(System.in);

System.out.println("1. Volume of Cube");

System.out.println("2. Volume of Sphere");

System.out.println("3. Volume of Cuboid");

System.out.print("Enter your choice: ");

int choice = in.nextInt();

switch(choice) {

case 1:

System.out.print("Enter side of cube: ");

double cs = in.nextDouble();

double cv = Math.pow(cs, 3);

System.out.println("Volume of cube = " + cv);

break;

case 2:

System.out.print("Enter radius of sphere: ");

double r = in.nextDouble();

double sa = (4 / 3.0) * (22 / 7.0) * Math.pow(r, 3);

System.out.println("Volume of sphere = " + sa);

break;

case 3:

System.out.print("Enter length of cuboid: ");

double l = in.nextDouble();

pls mark me brainliest

i need it

have an nice day !!!

Similar questions