Lukas4186

Java Problem

Jan 9th, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.46 KB | None | 0 0
  1. /* Es wird der Umfang und die Fläche eines Kreises berechnet, bei Programmstart wird der Radius abgefragt.
  2. */
  3.  
  4. public class Kreisberechnung2 {
  5. public static void main(String[] args[]) {
  6. double radius;
  7. double umfang, inhalt;
  8. radius = Double.parseDouble(args[0]);
  9. umfang = 2.0 * 3.1415926 * radius;
  10. inhalt = 3.1415926 * radius * radius;
  11. System.out.print("Umfang: ");
  12. System.out.println(umfang);
  13. System.out.print("Flaeche ");
  14. System.out.println(inhalt);
  15. }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment