Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Challenge: if Condition | Section
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
C# Basics
Sectionย 1. Chapterย 30
single

single

bookChallenge: if Condition

Swipe to show menu

Task

Swipe to start coding

  • Declare an integer variable for the userโ€™s age.
  • If the user is 18 or older, print Access granted.
  • If the user is between 13 and 17, print Access limited.
  • If the user is 12 or younger, print Access denied.

Solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Sectionย 1. Chapterย 30
single

single

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

some-alt