Advertisement
Guest User

Untitled

a guest
Aug 20th, 2014
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. public class test {
  2. public static void main(String[] args) {
  3. double radius, umfang, inhalt;
  4. String einheit;
  5. einheit = args[1];
  6. radius = Double.parseDouble(args[0]);
  7. umfang = 2.0 * 3.1415926 * radius;
  8. inhalt = 3.1415926 * radius * radius;
  9. System.out.print("Umfang: ");
  10. System.out.print(umfang);
  11. System.out.println(" " + einheit);
  12. System.out.print("Flaeche: ");
  13. System.out.print(inhalt);
  14. System.out.println(" " + einheit + '\u00fd');
  15. }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement