Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix this pls #70

Open
Sree-Ram-MS opened this issue Mar 6, 2022 · 3 comments
Open

Fix this pls #70

Sree-Ram-MS opened this issue Mar 6, 2022 · 3 comments

Comments

@Sree-Ram-MS
Copy link

import java.util.Scanner;
interface Volume
{
double pi=3.14;
void readdata();
void dispvolume();
}
class Sphere implements Volume
{
double r=0,vol;
public void readdata()
{

Scanner input=new Scanner(System.in);
System.out.print("Enter the radius of the Sphere :");
r=input.nextDouble();

}
public void dispvolume()
{
vol=(4/33.14rrr);
System.out.println("Volume of Sphere : "+vol);
}
}
class Cylinder implements Volume
{
double R,h,vol;
public void readdata()
{
Scanner input=new Scanner(System.in);
System.out.print("Enter the radius of the Cylinder :");
R=input.nextDouble();
System.out.print("Enter the height of the Cylinder :");
h=input.nextDouble();
}
public void dispvolume()
{
vol=piRR*h;
System.out.println("Volume of the Cylinder: "+vol);

}
}
public class VolumeMain
{
public static void main(String args[])
{
Sphere obj=new Sphere();
obj.readdata();
obj.dispvolume();
Cylinder obj1=new Cylinder();
obj1.readdata();
obj1.dispvolume();
}
}

@AniketNS
Copy link

Hello brother, I would love to work on this issue. Can you please assign this task to me?

@oohsai
Copy link

oohsai commented Jul 31, 2023

Hey! I'd be eager to solve this issue. If you could assign this task to me

@AryamanDhoundiyal
Copy link

any one working on this

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants