Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class nauka {
- public static void skan() {
- System.out.println("podaj promien");
- Scanner sk = new Scanner(System.in);
- double r = sk.nextDouble();
- }
- public static double pole(double r) {
- double p = 3.14 * r*r;
- return p;
- }
- public static void main(String[] args) {
- skan();
- System.out.println("pole koła wynosi" + pole());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement