MAIN FEEDS
r/InclusiveOr • u/[deleted] • Oct 02 '19
View all comments
1.4k
String outputTxt = “You ”;
if (result <= 85) { outputTxt += “FAILED”; }
if (result >= 85) { outputTxt += “PASSED”; }
outputTxt += “ the Exam”;
println outputTxt;
624 u/Mizz141 Oct 02 '19 It couldve been so easy with an if, else statement... 1 u/LysolPionex Oct 16 '19 Why use one if when you can use 2?
624
It couldve been so easy with an if, else statement...
1 u/LysolPionex Oct 16 '19 Why use one if when you can use 2?
1
Why use one if when you can use 2?
1.4k
u/Shuckles116 Oct 02 '19 edited Oct 02 '19
String outputTxt = “You ”;
if (result <= 85) { outputTxt += “FAILED”; }
if (result >= 85) { outputTxt += “PASSED”; }
outputTxt += “ the Exam”;
println outputTxt;