Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Task07 {
- public static void main(String[] args) {
- Scanner sc = new Scanner(System.in);
- //System.out.println("Please enter the time");
- //int time = sc.nextInt();
- System.out.println("Please enter amount");
- double amount = sc.nextDouble();
- System.out.println("Are you feeling well?");
- boolean health = sc.nextBoolean();
- if (health = false & amount>10) {
- System.out.println("I will buy a medicine");
- }
- if (health = false & amount < 10) {
- System.out.println("I will drink a tea");
- }
- if (health= true & amount>10){
- System.out.println("I will go to a cinema with friends");
- }
- if (health=true & amount<10) {
- System.out.println("I will go out for a walk");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement