Convert boolean values to strings 'Yes' or 'No'.

Convert boolean values to strings 'Yes' or 'No'.

Complete the bool_to_word (JavascriptboolToWord ) method.

Given: a boolean value

Return: a 'Yes' string for true and a 'No' string for false

using System;
using System.Linq;

public static class Kata
{
  public static string boolToWord(bool word)
  {
    //TODO
    if(word)
    {
      return "Yes";
    }
    else
    {
      return "No";
    }
  }
}

 

posted @ 2015-06-24 13:27  ChuckLu  阅读(658)  评论(0)    收藏  举报