Advertisement
silvana1303

beehive role

May 22nd, 2020
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.59 KB | None | 0 0
  1. using System;
  2.  
  3. namespace exampreparation
  4. {
  5.     class exam
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int intelligence = int.Parse(Console.ReadLine());
  10.             int power = int.Parse(Console.ReadLine());
  11.             string sex = Console.ReadLine();
  12.  
  13.             string role = "";
  14.  
  15.             if (intelligence >= 80)
  16.             {
  17.                 if (power >= 80)
  18.                 {
  19.                     if (sex == "female")
  20.                     {
  21.                         role = "Queen Bee";
  22.                         Console.WriteLine($"{role}");
  23.                         return;
  24.                     }
  25.                 }
  26.             }
  27.  
  28.             if (intelligence >= 80)
  29.             {
  30.                 role = "Repairing Bee";
  31.                 Console.WriteLine($"{role}");
  32.                 return;
  33.             }
  34.  
  35.             if (intelligence >= 60)
  36.             {
  37.                 role = "Cleaning Bee";
  38.                 Console.WriteLine($"{role}");
  39.                 return;
  40.             }
  41.  
  42.             if (power >= 80)
  43.             {
  44.                 if (sex == "male")
  45.                 {
  46.                     role = "Drone Bee";
  47.                     Console.WriteLine($"{role}");
  48.                     return;
  49.                 }
  50.             }
  51.  
  52.             if (power >= 60)
  53.             {
  54.                 role = "Guard Bee";
  55.                 Console.WriteLine($"{role}");
  56.                 return;
  57.             }
  58.             else
  59.             {
  60.                 role = "Worker Bee";
  61.                 Console.WriteLine($"{role}");
  62.             }
  63.  
  64.  
  65.         }
  66.     }
  67. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement