Untitled
unknown
plain_text
5 months ago
936 B
5
Indexable
import java.util.*; class niggzeggwater{ Scanner obj=new Scanner(System.in); double v,l,b,h,r,s; int c; void main(){ System.out.println("Enter the choice"); System.out.println("enter l"); System.out.println("enter b"); System.out.println("enter h"); System.out.println("enter s"); System.out.println("enter r"); l=obj.nextDouble(); b=obj.nextDouble(); h=obj.nextDouble(); s=obj.nextDouble(); r=obj.nextDouble(); c=obj.nextInt(); if(c==1){ v=l*b*h; } else if(c==2){ v=s*s*s; } else if (c==3){ v=3.142*r*r*s; } else{ System.out.println("Invalid input"); } System.out.println(v); } }
Editor is loading...
Leave a Comment