Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class SleepyGuy {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- System.out.print("Enter how many hours SHM has overslept at Sunday\n");
- int SHMhours = Integer.parseInt(scanner.nextLine());
- System.out.print("Enter Maria expectations in the beginning of the day for SHM to wake up\n");
- int MariaWaitingTime = Integer.parseInt(scanner.nextLine());
- double SundayStartsAT = 10.0;
- double SHMWAKEUP = SHMhours+SundayStartsAT;
- double MariaEXPT = SundayStartsAT+MariaWaitingTime;
- double daylastsfor = 22-SundayStartsAT;
- if (SHMWAKEUP <=MariaEXPT) {
- System.out.printf("Shmatkata wake up at %.0f. Maria is Happy. There is some time for her to spend the day with her man", SHMWAKEUP);
- } else if (SHMhours>=MariaEXPT && SHMhours <= daylastsfor) {
- System.out.printf("Shmatkata wake up at %.0f. SHM is going to spend the rest with Maria mad at him", SHMWAKEUP);
- } else {
- System.out.println("SHM if fucked up. Better not to try to talk to Maria or he`ll be dead. There is other," +
- "weekend coming soon.!");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement