Algorithm 7 - Convert boolean values to strings 'Yes' or 'No'.

Beast from the east·2021년 10월 6일
0

Algorithm

목록 보기
7/27

Q.

Description:
Complete the method that takes a boolean value and return a "Yes" string for true, or a "No" string for false.

A)

const char *bool_to_word (int value)
{
  return (value ? "Yes" : "No");
}
profile
Hello, Rabbit

0개의 댓글