If else: Revision history

From Applied Science

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

21 January 2025

18 April 2022

17 April 2022

  • curprev 23:5923:59, 17 April 2022Wikiadmin talk contribs 3,430 bytes +3,430 Created page with "* '''An algorithm that tests if a number is odd or even:''' <div style="margin-left:1.5em;"> int a; if (a % 2 == 0) printf("The number %d is even", a);<br /> else printf("The number %d is odd", a); </div> Pretty simple, just the part related to user input has been omitted. It's pretty intuitive the concept about decision making in examples such as this one. * '''A variation of the algorithm above, this time with the operators AND, OR plus ELSE IF:''' <div style="ma..."