Секція 1. Розділ 27
single
Challenge: Operators
Свайпніть щоб показати меню
Завдання
Проведіть, щоб почати кодувати
- Declare an
intvariable for the user's age. - Declare a
boolvariable for membership status. - Use comparison operators (
>=) to check if age is 65 or older. - Use logical operators (
||) to check if the user is a member. - Use a ternary operator (
?:) to assign the message"Eligible for discount"or"Not eligible for discount"based on the conditions. - Print the message to the console using
Console.WriteLine.
Рішення
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 1. Розділ 27
single
Запитати АІ
Запитати АІ
Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат