Kursinnhold
C++ Conditional Statements
C++ Conditional Statements
1. Introduction to Conditional Statements
2. Conditional Control Flow Practice
3. Advanced Topics
Which Triangle
Oppgave
Swipe to start coding
- Identify the type of triangle based on the lengths of its sides: whether it is an equilateral or isosceles triangle. Ensure the checks are performed in the correct order.
- Output in the console:
It is equilateral triangle!
if it is equilatera;It is isosceles triangle!
if it is isosceles;None of them
if it is none of the above.
Løsning
solution
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 2. Kapittel 3
Which Triangle
Oppgave
Swipe to start coding
- Identify the type of triangle based on the lengths of its sides: whether it is an equilateral or isosceles triangle. Ensure the checks are performed in the correct order.
- Output in the console:
It is equilateral triangle!
if it is equilatera;It is isosceles triangle!
if it is isosceles;None of them
if it is none of the above.
Løsning
solution
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 2. Kapittel 3