Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class SumNumbers_07 {
- public static void main(String[] args) {
- //повтаряме: четем текст -> отпечатваме текст
- //спираме: текст == "Stop"
- //продължаваме: текст != "Stop"
- Scanner scanner = new Scanner(System.in);
- String text = scanner.nextLine();
- while (!text.equals("Stop")) {
- System.out.println(text);
- text = scanner.nextLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment