You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

20 lines
572 B

using System;
using System.Linq;
public static class Bob
{
public static string Response(string statement)
{
if (string.IsNullOrWhiteSpace(statement))
return "Fine. Be that way!";
if (statement.Any(Char.IsLetter) && statement.Where(Char.IsLetter).All(Char.IsUpper))
if (statement.Contains("?"))
return "Calm down, I know what I'm doing!";
else
return "Whoa, chill out!";
if (statement.Trim().EndsWith("?"))
return "Sure.";
return "Whatever.";
}
}