Advertisement
markov5534

Untitled

Nov 19th, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class seksZelenchuci {
  4. public static void main(String[] args) {
  5. Scanner scanner = new Scanner(System.in);
  6.  
  7. System.out.print("What product daddy: ");
  8. String product=scanner.next();
  9.  
  10. if(product.equals("banana")||product.equals("apple")||product.equals("kiwi")||product.equals("cherry")||
  11. product.equals("lemon")||product.equals("grapes")){
  12. System.out.println("This is fruit daddy.");
  13.  
  14.  
  15. }else if(product.equals("tomato")||product.equals("cucumber")||product.equals("pepper")||product.equals("carrot")){
  16.  
  17. System.out.println("This is vegetable daddy.");
  18.  
  19. }else{
  20. System.out.println("I don't know what this is daddy.");
  21. }
  22.  
  23.  
  24.  
  25.  
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement