Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- boolean e=true;
- double a;
- do {
- try{
- e=false;
- Scanner scan = new Scanner(System.in);
- String xd = scan.nextLine();
- a = Double.parseDouble(xd);
- }
- catch(NumberFormatException ee){
- System.err.println("Zły typ gościu");
- e=true;
- }
- }
- while(e==true);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement