Advertisement
Guest User

Untitled

a guest
May 30th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Task07 {
  4.  
  5. public static void main(String[] args) {
  6.  
  7. Scanner sc = new Scanner(System.in);
  8. //System.out.println("Please enter the time");
  9. //int time = sc.nextInt();
  10. System.out.println("Please enter amount");
  11. double amount = sc.nextDouble();
  12. System.out.println("Are you feeling well?");
  13. boolean health = sc.nextBoolean();
  14.  
  15. if (health = false & amount>10) {
  16. System.out.println("I will buy a medicine");
  17. }
  18. if (health = false & amount < 10) {
  19. System.out.println("I will drink a tea");
  20. }
  21. if (health= true & amount>10){
  22. System.out.println("I will go to a cinema with friends");
  23. }
  24. if (health=true & amount<10) {
  25. System.out.println("I will go out for a walk");
  26. }
  27.  
  28.  
  29.  
  30. }
  31.  
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement