Проблем с задача 9 на Exercise: Data Types and Variables Spice, Must Flow! Резултат 71/100.
https://pastebin.com/H3gFMkgF
https://pastebin.com/H3gFMkgF
import java.util.Scanner;
public class SpiceMustFlow {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int yield = Integer.parseInt(scanner.nextLine());
int storage = 0;
int days = 0;
while (yield >= 100) {
storage += yield - 26;
days++;
yield -= 10;
}
if (storage >= 26) {
storage -= 26;
}
System.out.println(days);
System.out.println(storage);
}
}
Благодаря!