Advertisement
Guest User

Untitled

a guest
Jun 14th, 2016
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class nauka {
  4.  
  5. public static void skan() {
  6. System.out.println("podaj promien");
  7. Scanner sk = new Scanner(System.in);
  8. double r = sk.nextDouble();
  9. }
  10.  
  11. public static double pole(double r) {
  12.  
  13.  
  14. double p = 3.14 * r*r;
  15. return p;
  16.  
  17. }
  18. public static void main(String[] args) {
  19. skan();
  20. System.out.println("pole koła wynosi" + pole());
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement