Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Es wird der Umfang und die Fläche eines Kreises berechnet, bei Programmstart wird der Radius abgefragt.
- */
- public class Kreisberechnung2 {
- public static void main(String[] args[]) {
- double radius;
- double umfang, inhalt;
- radius = Double.parseDouble(args[0]);
- umfang = 2.0 * 3.1415926 * radius;
- inhalt = 3.1415926 * radius * radius;
- System.out.print("Umfang: ");
- System.out.println(umfang);
- System.out.print("Flaeche ");
- System.out.println(inhalt);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment