Lesson 4 of 24

Conditions: if, else, switch

9 min 25 XP

if / else if / else மற்றும் switch, C-ல் உள்ளது போலவே. && (AND), || (OR), ! (NOT) மூலம் conditions-ஐ இணைக்கலாம்.

Example: edit me and press Run

Output Loading C++ (first time takes a few seconds)
Press Run to see the result here.

Challenge

+25 XP

மூன்று பக்க நீளங்களைப் படித்து, முக்கோணம் அமைய முடியுமா என்று சோதியுங்கள். முடியாவிட்டால் "Invalid"; முடிந்தால் "Equilateral", "Isosceles" அல்லது "Scalene". Input: 3 4 5 → Output: Scalene

Output Loading C++ (first time takes a few seconds)
Press Run to see the result here.