Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   C++ (https://www.askmehelpdesk.com/forumdisplay.php?f=439)
-   -   Is the decision point in an IFTHENELSE statement a conditional or unconditional? (https://www.askmehelpdesk.com/showthread.php?t=792210)

  • May 16, 2014, 03:54 PM
    13jacksonpa
    Is the decision point in an IFTHENELSE statement a conditional or unconditional?
    I believe it would be an unconditional branch, because whether the program follows "T" or "F" it continues (sorry for my lack of fancy programming words I'm just starting)
  • May 18, 2014, 06:26 AM
    Appzalien
    WOW! It's been a long time since I did anything with programming language but it seems to me to be conditional. If a is b then c else d so you actually have two choices c or d. d could actually be to return to the initial choice like if your asking for input y for yes and n for no and someone accidentally types u it would return to asking for y or n cause u is not a choice. Take that with a grain of salt since I took fortran in 1982.
  • May 18, 2014, 07:02 AM
    ScottGem
    This sounds like a homework question, is it? If so you should identify it as such.

    In any case, an If... Then... Else statement is called a conditional. Because it acts differently depending on whether a condition is true or false. In addition to If... Then... Else you also have Select Case statements that fall into the Conditionals class.

  • All times are GMT -7. The time now is 11:21 PM.