Tuesday, September 27, 2016

Compare and Contrast for if,if-else,switch statements

The conditional statements of  if, if-else,and switch statements have lot of similarities and a lot of differences. Some similarities between them is that if and if-else let the user input more than one answer. Switch statements also let the user input more than one answer. A difference between all of these conditional statements is that if and if-else statements is that you can only make it so that the user is able to input 2 answers. On the other hand, switch statements let the user input more than one answer.

No comments:

Post a Comment