Challenge: Fix the Code
Here is a challenge to highlight the importance of the scope of conditional expressions in a code.
We'll cover the following...
Study and run the code below:
Press + to interact
import std.stdio;void LemonadeOrPie() {bool existsLemonade = false;if (existsLemonade) {writeln("Drinking lemonade");writeln("Washing the cup");} elsewriteln("Eating pie");writeln("Washing the plate");}
But when you run this program, you ...
Access this course and 1400+ top-rated courses and projects.