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

bookChallenge: if Condition

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

Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 3. ChapterΒ 6
single

single

Ask AI

expand

Ask AI

ChatGPT

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

close

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Β 3. ChapterΒ 6
single

single

some-alt