Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package L04_ForLoop;
- import java.util.Scanner;
- public class P05_Salary {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int tabs = Integer.parseInt(scanner.nextLine());
- int salary = Integer.parseInt(scanner.nextLine());
- for (int i = 1; i <=tabs ; i++) {
- String websiteName = scanner.nextLine();
- //todo -> проверка за име на сайта - намалене на заплата
- if(salary <= 0){
- System.out.println("You have lost your salary.");
- break;
- }
- }
- //todo -> проверка дали заплатата е над -> 0
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment