Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package ikerprim;
- import java.util.Scanner;
- public class ikerprim
- {
- public static void main(String[] args)
- {
- Scanner s=new Scanner(System.in);
- int a,b,c;
- System.out.println("Írj be 3 számot!");
- do {
- System.out.println("1. szám:");
- a = s.nextInt();
- System.out.println("2. szám:");
- b = s.nextInt();
- System.out.println("3. szám:");
- c = s.nextInt();
- if (c>Math.max(a,b)||c<Math.min(a,b)) {
- System.out.println("Elbasztad, írj be megint 3 számot!");
- }
- } while (c>Math.max(a,b)||c<Math.min(a,b));
- System.out.println("sikeresen beírtál 3 számot!");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement