desislava_topuzakova

01. Read Text

Oct 9th, 2021
974
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.53 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class SumNumbers_07 {
  4.     public static void main(String[] args) {
  5.         //повтаряме: четем текст -> отпечатваме текст
  6.         //спираме: текст == "Stop"
  7.         //продължаваме: текст != "Stop"
  8.         Scanner scanner = new Scanner(System.in);
  9.         String text = scanner.nextLine();
  10.  
  11.         while (!text.equals("Stop")) {
  12.             System.out.println(text);
  13.             text = scanner.nextLine();
  14.         }
  15.  
  16.  
  17.  
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment