mjc65

Example 1-61. A complex if statement

Jun 23rd, 2020
506
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.28 KB | None | 0 0
  1. void Check(char input)
  2. {
  3.     if (input == 'a'
  4.         || input == 'e'
  5.         || input == 'i'
  6.         || input == 'o'
  7.         || input == 'u')
  8.     {
  9.         Console.WriteLine("Input is a vowel");
  10.     }
  11.     else
  12.     {
  13.         Console.WriteLine("Input is a consonant");
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment