Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApplication1
- {
- class Play
- {
- public void CanPlay(string outlook, string temp, string huminity, string windy)
- {
- string play = "yes";
- if (outlook == "overcast")
- {
- play = "yes";
- }
- if (outlook == "sunny" && huminity == "high")
- {
- play = "no";
- }
- else if (outlook == "sunny" && huminity == "normal")
- {
- play = "yes";
- }
- if (outlook == "rainy" && windy == "FALSE")
- {
- play = "yes";
- }
- else if (outlook == "rainy" && windy == "TRUE")
- {
- play = "yes";
- }
- Console.WriteLine("Outlook: " + outlook + ", Temperature: " + temp + " Huminity: " + huminity + " Windy: " + windy);
- Console.WriteLine("Play? " + play);
- }
- }
- }
Add Comment
Please, Sign In to add comment