알고리즘 6 - Convert boolean values to strings 'Yes' or 'No'

tamagoyakii·2021년 10월 4일
1

알고리즘

목록 보기
6/89

Q.

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 > 0 ? "Yes" : "No";
};

0개의 댓글