Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» Download - Green Lantern 2011
Compute Sphere Radius EmptySun Sep 25, 2011 4:47 pm by Admin

» Download - Shark Night 3D
Compute Sphere Radius EmptySun Sep 25, 2011 4:41 pm by Admin

» Download - Apollo 18
Compute Sphere Radius EmptyWed Sep 21, 2011 6:37 am by Admin

» [REMODELLED] PSP E1000 - REVAMPED
Compute Sphere Radius EmptyMon Sep 19, 2011 9:56 am by Admin

» PS VITA IS OFFICIALLY REGION FREE!!
Compute Sphere Radius EmptyMon Sep 19, 2011 9:49 am by Admin

» Manga - Popcorn Avatar
Compute Sphere Radius EmptyMon Sep 19, 2011 9:11 am by Admin

» [UPCOMING SOON] Assassin's Creed - Revelations
Compute Sphere Radius EmptyMon Sep 19, 2011 8:44 am by Admin

» Assassin's Creed 2
Compute Sphere Radius EmptyMon Sep 19, 2011 8:26 am by Admin

» Assassin's Creed
Compute Sphere Radius EmptyMon Sep 19, 2011 6:47 am by Admin

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

You are not connected. Please login or register

View previous topic View next topic Go down  Message [Page 1 of 1]

Admin

Admin
Investor Persona
File name: sphere.java

Code:

public class sphere{
      public static void main(String[] args)throws IOException{
      BufferedReader input = new BufferedReader(new InputStreamReader(System.in));

      double a, pi, sphere, rad;
      pi = 3.1416;
     
      System.out.println("Enter Radius:");
      System.out.println("");
      a = Double.parseDouble(input.readLine());
      rad = a*a*a;
      sphere = (4.0/3.0)*pi*rad;
      System.out.println(" ");
      System.out.println("Sphere:"+sphere);
      }
}

Display Results:

Enter Radius:

Sphere: xx.xx

https://advatar.forumotion.com
Share this post on: reddit

No Comment.

View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum

 

Free forum | ©phpBB | Free forum support | Report an abuse | Forumotion.com