SlideShare una empresa de Scribd logo
1 de 7
Descargar para leer sin conexión
| Main |< C & C++ if and if-else 2 | C & C++ if and if-else 4 >| Site Index | Download |




                                                               C LAB WORKSHEET 8a
                                                      C & C++ Selection: C/C++ if and if-else Part 3
Items in this page:

    1.   The C & C++ conditional statement, a selection and flowcharts.
    2.   The if, if-else construct, variations and flowcharts.
    3.   Activities, questions and answers.
    4.   Tutorial reference that should be used together with this worksheet are: C & C++ program control 1 and C & C+
         + program control 2.


    9. The following experiment should give the same result as the previous                 if(k < 90)
         one. Only the logic has been rearranged. Complete the flowchart and the                  if(k < 80)
         program so that the output is same as before.                                                 lower = lower + 1;
                                                                                                 else
          #include <stdio.h>                                                                           b = b + 1;
                                                                                            else
          int main(void)                                                                        a = a + 1;
          {
              int i, k, a = 0, b = 0, lower = 0;
              printf("Enter the sample input line by line:n");
              for(i = 1; i <= 7; i = i + 1)
              {
                   scanf_s("%d", &k, 1);
                   if(k < 90)
                        if(k < 80)
                             ________________________________
                        else
                             ________________________________
                   else
                   ____________________________________
              }
              printf("A's = %dtB's = %dtLower = %dn", a, b, lower);
              return 0;
          }




   10. Next, let us test the conditions for all five grades, namely A, B, C, D and          if(k < 90)
         F. In the blank space, for each grade, place the appropriate statement                 if(k < 80)
         something like the following:                                                              if(k < 70)
                                                                                                        if(k < 60)
                 printf("A.n");                                                                            printf("Grade F.n");
                                                                                                        else
          Each else that is lined up under an if is that condition’s false side.                            printf("Grade D.n");
          Complete the code and the flowchart.                                                      else
                                                                                                        printf("Grade C.n");
          #include <stdio.h>                                                                    else
                                                                                                    printf("Grade B.n");
          int main(void)                                                                    else
          {                                                                                     printf("Grade A.n");
              int i, k;
              printf("Enter the sample input line by line:n");
              for(i = 1; i <= 7; i = i + 1)
              {
                   scanf_s("%d", &k, 1);
                   if(k < 90)
if(k < 80)
                  if(k < 70)
                       if(k < 60)
                            ____________________________
                       else
                       _____________________________
                  else
                  _____________________________
             else
             ______________________________
         else
         ____________________________
     }
     return 0;
}




■   The following is the completed flowchart.




    a. On the F (false) side of k < 90? Only A grades are selected. On the T (true) side of that condition, which grades
       are selected, A, B, C, D and/or F?
    b. On the T side of k < 80?, which grades are selected?
    c. On the T side of k < 70?, which grades are selected? What about on the F side?
    d. Grades that end up getting a B must go through how many decision diamonds?
e. Grades that end up getting a D must go through how many decision diamonds?

     Ans:

        a.   B, C, D and F.
        b.   C, D and F.
        c.   On the True side are D and F. On the False side, C was selected.
        d.   2 decision diamonds.
        e.   4 decision diamonds.



11. The following experiment performs the same steps as in the previous          if(k > 69)
     one. However, since the logic is rearranged, the printf() will need to be       if(k > 89)
     placed at different locations. Complete the code and the flowchart.                 printf("Grade A.n");
                                                                                     else if(k > 79)
     #include <stdio.h>                                                                  printf("Grade B.n");
                                                                                     else
     int main(void)                                                                      printf("Grade C.n");
     {                                                                               else if(k > 59)
         int i, k;                                                                       printf("Grade D.n");
         printf("Enter the sample input line by line:n");                           else
         for(i = 1; i <= 7; i = i + 1)                                                   printf("Grade F.n");
         {
              scanf_s("%d", &k, 1);
              if(k > 69)
                   if(k > 89)
                        ________________________
                   else if(k > 79)
                        ________________________
                   else
                   __________________________
              else if(k > 59)
                   __________________________
              else
                  ____________________________
         }
         return 0;
     }




 ■   The following is a completed flowchart for the previous question.
a. F grades will go through two conditions: k > 69?, which would be false and k > 59?, which also would be false.
         How many conditions that D grades go through?
      b. How many conditions that C grades go through?
      c. How many conditions that A grades go through?
      d. If k > 79? were changed to k <= 80?, then what changes would be necessary in the flowchart?
      e. When a grade that is read into the variable k enters this set of nested if’s, it has a choice of going through
         how many different paths?
      f. The control of execution may take how many different paths at any one time?

   Ans:

      a.   Also 2 conditions same as F but both are True.
      b.   3 conditions.
      c.   2 conditions.
      d.   The True (T) and False (F) positions need to be exchanged for the k > 79 decision diamond.
      e.   5 different paths based on the path toward the Stop.
      f.   At any one time it will take 2 paths based on the True (T) and False (F) paths.




12. The following experiment performs the same steps as in the last two             if(k <= 59)
   previous experiments. However, it count the number of grades in each                 f = f + 1;
   category instead of printing them. Complete the code and the flowchart.          else if(k <= 89)
                                                                                        if(k <= 69)
    #include <stdio.h>                                                                      d = d + 1;
                                                                                        else if(k <= 79)
    int main(void)                                                                          c = c + 1;
    {                                                                                   else
        int i, k, a=0, b=0, c=0, d=0, f=0;                                                  b = b + 1;
        printf("Enter the sample input line by line:n");                               else
        for(i = 1; i <= 7; i = i + 1)                                                       a = a + 1;
        {
             // for older compiler you can try using scanf()
             scanf_s("%d", &k, 1);
             if(k <= 59)
                  ____________________________
             else if(k <= 89)
                  if(k <= 69)
                       _______________________________
                  else if(k <= 79)
                       _______________________________
              else
                  _______________________________
             else
                _____________________________
        }
        printf("A's = %dt", a);
        printf("B's = %dt", b);
        printf("C's = %dt", c);
        printf("D's = %dt", d);
        printf("F's = %dn", f);
        return 0;
    }
-------------------------------------------------------------------------------------------------


■   The following is the answer for the flowchart diagram.




For each of these questions, choose from among the grades of A, B, C, D
and F.
                                                                                                a.   F.
                                                                                                b.   A, B, C and D.
           a.   Which grades(s) are selected on the true side of k <= 59?
                                                                                                c.   B, C and D.
           b.   Which grades(s) are selected on the false side of k <= 59?
                                                                                                d.   A.
           c.   Which grades(s) are selected on the true side of k <= 89?
                                                                                                e.   D.
           d.   Which grades(s) are selected on the false side of k <= 89?
                                                                                                f.   B and C.
           e.   Which grades(s) are selected on the true side of k <= 69?
                                                                                                g.   C.
           f.   Which grades(s) are selected on the false side of k <= 69?
                                                                                                h.   B.
           g.   Which grades(s) are selected on the true side of k <= 79?
           h.   Which grades(s) are selected on the false side of k <= 79?
13. Run the following program and key in the following sample input (without
   the commas): 16, 21, 17, 43, 7, 52, -1. The program will determine the
   smallest number entered.

    #include <stdio.h>

    int main(void)
    {
        int k, smallest;
        printf("Enter integers, when");
        printf(" done enter a ");
        printf("negative numbern");
        scanf_s("%d", &k, 1);
        // assign the first number to smallest variable
        smallest = k;
        // iterate while k >= 0
        for( ; k >= 0; )
        {
              // if the entered number is < smallest
              if(k < smallest)
                    // then assign the number to smallest variable...
                    smallest = k;
              // read the next input....repeat
              scanf_s("%d", &k, 1);
        }
        // print the smallest number...
        printf("The smallest number is %dn", smallest);
        return 0;
    }


      a. Draw a tracechart for this experiment (left to you!).
      b. What was the first value of the variable smallest?                    a. Left for your assignment.
      c. The first time that the condition in the if statement was             b. 16
          encountered, what were the values of k and smallest?                 c. k = 16, smallest =16.
      d. The second time that the if condition was tested, what were           d. k = 21, smallest = 16.
          the values of k and smallest?                                        e. k = 17, smallest = 16.
      e. The third time that the if condition was tested, what were the        f. 16 and 7.
          values of k and smallest?                                            g. Not really. It can be standalone in testing just a condition.
      f. During the loop, the value of smallest was changed. What              h. From the flowchart we can see that the scanf_s() executed inside the
          were the different values of smallest?                                  loop irrespective of k < smallest is True or False.
      g. Does an if statement require a corresponding else                     i. 0 time. It is already a smallest number entered as the first input.
          statement? Why?
      h. Is the scanf_s() executed inside the loop when the k <
          smallest is true or false, or irrespective of it?
       i. If the data entered were 11, 22, 13, 19, 16, -1, how many
          times would smallest be changed?

   To see the flow of this program clearer and used for
   troubleshooting you can add several line of codes as shown below.

   #include <stdio.h>

   int main(void)
   {
      int k, smallest;
      printf("Enter integers, when");
      printf(" done enter a ");
      printf("negative numbern");
      scanf_s("%d", &k, 1);
      // assign the first number to smallest variable
      smallest = k;
      printf("smallest = %d, k = %d at pos1.n", smallest, k);
      // iterate while k >= 0
      for( ; k >= 0; )
      {
          // if the entered number is < smallest
          printf("smallest = %d, k = %d at pos2.n", smallest, k);
          if(k < smallest)
            // then assign the number to smallest variable...
            smallest = k;
          printf("smallest = %d, k = %d at pos3.n", smallest, k);
          // read the next input....repeat
          scanf_s("%d", &k, 1);
          printf("smallest = %d, k = %d at pos4.n", smallest, k);
      }
      // print the smallest number...
      printf("The smallest number is %dn", smallest);
      return 0;
   }
   // Sample inputs: 16, 21, 17, 43, 7, 52, -1 and 11, 22, 13, 19, 16, -1
| Main |< C & C++ if and if-else 2 | C & C++ if and if-else 4 >| Site Index | Download |

                   The C Selection if, if-else, if-else-if, break, conditional/ternary operator and switch-case-break: Part 1 |
                                                        Part 2 | Part 3 | Part 4 | Part 5 | Part 6

tenouk.com, 2007

Más contenido relacionado

La actualidad más candente (20)

c-programming-using-pointers
c-programming-using-pointersc-programming-using-pointers
c-programming-using-pointers
 
Revision1 C programming
Revision1 C programmingRevision1 C programming
Revision1 C programming
 
Struct examples
Struct examplesStruct examples
Struct examples
 
C lab-programs
C lab-programsC lab-programs
C lab-programs
 
Ansi c
Ansi cAnsi c
Ansi c
 
Program flowchart
Program flowchartProgram flowchart
Program flowchart
 
C programs
C programsC programs
C programs
 
Revision1schema C programming
Revision1schema C programmingRevision1schema C programming
Revision1schema C programming
 
6 c control statements branching &amp; jumping
6 c control statements branching &amp; jumping6 c control statements branching &amp; jumping
6 c control statements branching &amp; jumping
 
C Programming
C ProgrammingC Programming
C Programming
 
C important questions
C important questionsC important questions
C important questions
 
C lab excellent
C lab excellentC lab excellent
C lab excellent
 
C and Data Structures
C and Data Structures C and Data Structures
C and Data Structures
 
Srinivas Reddy Amedapu C and Data Structures JNTUH Hyderabad
Srinivas Reddy Amedapu C and Data Structures JNTUH HyderabadSrinivas Reddy Amedapu C and Data Structures JNTUH Hyderabad
Srinivas Reddy Amedapu C and Data Structures JNTUH Hyderabad
 
Core programming in c
Core programming in cCore programming in c
Core programming in c
 
C programms
C programmsC programms
C programms
 
C lab manaual
C lab manaualC lab manaual
C lab manaual
 
C Programming
C ProgrammingC Programming
C Programming
 
Lab. Programs in C
Lab. Programs in CLab. Programs in C
Lab. Programs in C
 
C Programming lab
C Programming labC Programming lab
C Programming lab
 

Destacado (14)

Files
FilesFiles
Files
 
Software engineering marsic
Software engineering   marsicSoftware engineering   marsic
Software engineering marsic
 
functional requirements using LPP
functional requirements using LPPfunctional requirements using LPP
functional requirements using LPP
 
Versioning
VersioningVersioning
Versioning
 
Mighty warrior class 8 25-10
Mighty warrior class 8 25-10Mighty warrior class 8 25-10
Mighty warrior class 8 25-10
 
Sermon 10 10_10pm
Sermon 10 10_10pmSermon 10 10_10pm
Sermon 10 10_10pm
 
Sermon 10 10_10pm
Sermon 10 10_10pmSermon 10 10_10pm
Sermon 10 10_10pm
 
using LPP
using LPPusing LPP
using LPP
 
Oct conference1
Oct conference1Oct conference1
Oct conference1
 
Difference between c and c
Difference between c and cDifference between c and c
Difference between c and c
 
Mighty warrior class 8 25-10
Mighty warrior class 8 25-10Mighty warrior class 8 25-10
Mighty warrior class 8 25-10
 
Photoshop reference
Photoshop referencePhotoshop reference
Photoshop reference
 
Design concepts and principles
Design concepts and principlesDesign concepts and principles
Design concepts and principles
 
Design Principles
Design PrinciplesDesign Principles
Design Principles
 

Similar a Cprogramcontrolifelseselection3

C++ Programming Club-Lecture 2
C++ Programming Club-Lecture 2C++ Programming Club-Lecture 2
C++ Programming Club-Lecture 2Ammara Javed
 
Understand more about C
Understand more about CUnderstand more about C
Understand more about CYi-Hsiu Hsu
 
Introduction to Basic C programming 02
Introduction to Basic C programming 02Introduction to Basic C programming 02
Introduction to Basic C programming 02Wingston
 
Bcsl 033 data and file structures lab s1-1
Bcsl 033 data and file structures lab s1-1Bcsl 033 data and file structures lab s1-1
Bcsl 033 data and file structures lab s1-1Dr. Loganathan R
 
Cs1123 5 selection_if
Cs1123 5 selection_ifCs1123 5 selection_if
Cs1123 5 selection_ifTAlha MAlik
 
important C questions and_answers praveensomesh
important C questions and_answers praveensomeshimportant C questions and_answers praveensomesh
important C questions and_answers praveensomeshpraveensomesh
 
Control Structures in C
Control Structures in CControl Structures in C
Control Structures in Csana shaikh
 
C aptitude scribd
C aptitude scribdC aptitude scribd
C aptitude scribdAmit Kapoor
 
CONTROL FLOW in C.pptx
CONTROL FLOW in C.pptxCONTROL FLOW in C.pptx
CONTROL FLOW in C.pptxSmitaAparadh
 
5 c control statements looping
5  c control statements looping5  c control statements looping
5 c control statements loopingMomenMostafa
 
C programs Set 2
C programs Set 2C programs Set 2
C programs Set 2Koshy Geoji
 

Similar a Cprogramcontrolifelseselection3 (20)

C if else
C if elseC if else
C if else
 
L3 control
L3 controlL3 control
L3 control
 
C programs
C programsC programs
C programs
 
C programming
C programmingC programming
C programming
 
C++ Programming Club-Lecture 2
C++ Programming Club-Lecture 2C++ Programming Club-Lecture 2
C++ Programming Club-Lecture 2
 
Understand more about C
Understand more about CUnderstand more about C
Understand more about C
 
Introduction to Basic C programming 02
Introduction to Basic C programming 02Introduction to Basic C programming 02
Introduction to Basic C programming 02
 
Bcsl 033 data and file structures lab s1-1
Bcsl 033 data and file structures lab s1-1Bcsl 033 data and file structures lab s1-1
Bcsl 033 data and file structures lab s1-1
 
Cs1123 5 selection_if
Cs1123 5 selection_ifCs1123 5 selection_if
Cs1123 5 selection_if
 
C Programming Example
C Programming Example C Programming Example
C Programming Example
 
important C questions and_answers praveensomesh
important C questions and_answers praveensomeshimportant C questions and_answers praveensomesh
important C questions and_answers praveensomesh
 
7 functions
7  functions7  functions
7 functions
 
Control Structures in C
Control Structures in CControl Structures in C
Control Structures in C
 
C-programs
C-programsC-programs
C-programs
 
C aptitude scribd
C aptitude scribdC aptitude scribd
C aptitude scribd
 
CONTROL FLOW in C.pptx
CONTROL FLOW in C.pptxCONTROL FLOW in C.pptx
CONTROL FLOW in C.pptx
 
Najmul
Najmul  Najmul
Najmul
 
5 c control statements looping
5  c control statements looping5  c control statements looping
5 c control statements looping
 
C lab
C labC lab
C lab
 
C programs Set 2
C programs Set 2C programs Set 2
C programs Set 2
 

Cprogramcontrolifelseselection3

  • 1. | Main |< C & C++ if and if-else 2 | C & C++ if and if-else 4 >| Site Index | Download | C LAB WORKSHEET 8a C & C++ Selection: C/C++ if and if-else Part 3 Items in this page: 1. The C & C++ conditional statement, a selection and flowcharts. 2. The if, if-else construct, variations and flowcharts. 3. Activities, questions and answers. 4. Tutorial reference that should be used together with this worksheet are: C & C++ program control 1 and C & C+ + program control 2. 9. The following experiment should give the same result as the previous if(k < 90) one. Only the logic has been rearranged. Complete the flowchart and the if(k < 80) program so that the output is same as before. lower = lower + 1; else #include <stdio.h> b = b + 1; else int main(void) a = a + 1; { int i, k, a = 0, b = 0, lower = 0; printf("Enter the sample input line by line:n"); for(i = 1; i <= 7; i = i + 1) { scanf_s("%d", &k, 1); if(k < 90) if(k < 80) ________________________________ else ________________________________ else ____________________________________ } printf("A's = %dtB's = %dtLower = %dn", a, b, lower); return 0; } 10. Next, let us test the conditions for all five grades, namely A, B, C, D and if(k < 90) F. In the blank space, for each grade, place the appropriate statement if(k < 80) something like the following: if(k < 70) if(k < 60) printf("A.n"); printf("Grade F.n"); else Each else that is lined up under an if is that condition’s false side. printf("Grade D.n"); Complete the code and the flowchart. else printf("Grade C.n"); #include <stdio.h> else printf("Grade B.n"); int main(void) else { printf("Grade A.n"); int i, k; printf("Enter the sample input line by line:n"); for(i = 1; i <= 7; i = i + 1) { scanf_s("%d", &k, 1); if(k < 90)
  • 2. if(k < 80) if(k < 70) if(k < 60) ____________________________ else _____________________________ else _____________________________ else ______________________________ else ____________________________ } return 0; } ■ The following is the completed flowchart. a. On the F (false) side of k < 90? Only A grades are selected. On the T (true) side of that condition, which grades are selected, A, B, C, D and/or F? b. On the T side of k < 80?, which grades are selected? c. On the T side of k < 70?, which grades are selected? What about on the F side? d. Grades that end up getting a B must go through how many decision diamonds?
  • 3. e. Grades that end up getting a D must go through how many decision diamonds? Ans: a. B, C, D and F. b. C, D and F. c. On the True side are D and F. On the False side, C was selected. d. 2 decision diamonds. e. 4 decision diamonds. 11. The following experiment performs the same steps as in the previous if(k > 69) one. However, since the logic is rearranged, the printf() will need to be if(k > 89) placed at different locations. Complete the code and the flowchart. printf("Grade A.n"); else if(k > 79) #include <stdio.h> printf("Grade B.n"); else int main(void) printf("Grade C.n"); { else if(k > 59) int i, k; printf("Grade D.n"); printf("Enter the sample input line by line:n"); else for(i = 1; i <= 7; i = i + 1) printf("Grade F.n"); { scanf_s("%d", &k, 1); if(k > 69) if(k > 89) ________________________ else if(k > 79) ________________________ else __________________________ else if(k > 59) __________________________ else ____________________________ } return 0; } ■ The following is a completed flowchart for the previous question.
  • 4. a. F grades will go through two conditions: k > 69?, which would be false and k > 59?, which also would be false. How many conditions that D grades go through? b. How many conditions that C grades go through? c. How many conditions that A grades go through? d. If k > 79? were changed to k <= 80?, then what changes would be necessary in the flowchart? e. When a grade that is read into the variable k enters this set of nested if’s, it has a choice of going through how many different paths? f. The control of execution may take how many different paths at any one time? Ans: a. Also 2 conditions same as F but both are True. b. 3 conditions. c. 2 conditions. d. The True (T) and False (F) positions need to be exchanged for the k > 79 decision diamond. e. 5 different paths based on the path toward the Stop. f. At any one time it will take 2 paths based on the True (T) and False (F) paths. 12. The following experiment performs the same steps as in the last two if(k <= 59) previous experiments. However, it count the number of grades in each f = f + 1; category instead of printing them. Complete the code and the flowchart. else if(k <= 89) if(k <= 69) #include <stdio.h> d = d + 1; else if(k <= 79) int main(void) c = c + 1; { else int i, k, a=0, b=0, c=0, d=0, f=0; b = b + 1; printf("Enter the sample input line by line:n"); else for(i = 1; i <= 7; i = i + 1) a = a + 1; { // for older compiler you can try using scanf() scanf_s("%d", &k, 1); if(k <= 59) ____________________________ else if(k <= 89) if(k <= 69) _______________________________ else if(k <= 79) _______________________________ else _______________________________ else _____________________________ } printf("A's = %dt", a); printf("B's = %dt", b); printf("C's = %dt", c); printf("D's = %dt", d); printf("F's = %dn", f); return 0; }
  • 5. ------------------------------------------------------------------------------------------------- ■ The following is the answer for the flowchart diagram. For each of these questions, choose from among the grades of A, B, C, D and F. a. F. b. A, B, C and D. a. Which grades(s) are selected on the true side of k <= 59? c. B, C and D. b. Which grades(s) are selected on the false side of k <= 59? d. A. c. Which grades(s) are selected on the true side of k <= 89? e. D. d. Which grades(s) are selected on the false side of k <= 89? f. B and C. e. Which grades(s) are selected on the true side of k <= 69? g. C. f. Which grades(s) are selected on the false side of k <= 69? h. B. g. Which grades(s) are selected on the true side of k <= 79? h. Which grades(s) are selected on the false side of k <= 79?
  • 6. 13. Run the following program and key in the following sample input (without the commas): 16, 21, 17, 43, 7, 52, -1. The program will determine the smallest number entered. #include <stdio.h> int main(void) { int k, smallest; printf("Enter integers, when"); printf(" done enter a "); printf("negative numbern"); scanf_s("%d", &k, 1); // assign the first number to smallest variable smallest = k; // iterate while k >= 0 for( ; k >= 0; ) { // if the entered number is < smallest if(k < smallest) // then assign the number to smallest variable... smallest = k; // read the next input....repeat scanf_s("%d", &k, 1); } // print the smallest number... printf("The smallest number is %dn", smallest); return 0; } a. Draw a tracechart for this experiment (left to you!). b. What was the first value of the variable smallest? a. Left for your assignment. c. The first time that the condition in the if statement was b. 16 encountered, what were the values of k and smallest? c. k = 16, smallest =16. d. The second time that the if condition was tested, what were d. k = 21, smallest = 16. the values of k and smallest? e. k = 17, smallest = 16. e. The third time that the if condition was tested, what were the f. 16 and 7. values of k and smallest? g. Not really. It can be standalone in testing just a condition. f. During the loop, the value of smallest was changed. What h. From the flowchart we can see that the scanf_s() executed inside the were the different values of smallest? loop irrespective of k < smallest is True or False. g. Does an if statement require a corresponding else i. 0 time. It is already a smallest number entered as the first input. statement? Why? h. Is the scanf_s() executed inside the loop when the k < smallest is true or false, or irrespective of it? i. If the data entered were 11, 22, 13, 19, 16, -1, how many times would smallest be changed? To see the flow of this program clearer and used for troubleshooting you can add several line of codes as shown below. #include <stdio.h> int main(void) { int k, smallest; printf("Enter integers, when"); printf(" done enter a "); printf("negative numbern"); scanf_s("%d", &k, 1); // assign the first number to smallest variable smallest = k; printf("smallest = %d, k = %d at pos1.n", smallest, k); // iterate while k >= 0 for( ; k >= 0; ) { // if the entered number is < smallest printf("smallest = %d, k = %d at pos2.n", smallest, k); if(k < smallest) // then assign the number to smallest variable... smallest = k; printf("smallest = %d, k = %d at pos3.n", smallest, k); // read the next input....repeat scanf_s("%d", &k, 1); printf("smallest = %d, k = %d at pos4.n", smallest, k); } // print the smallest number... printf("The smallest number is %dn", smallest); return 0; } // Sample inputs: 16, 21, 17, 43, 7, 52, -1 and 11, 22, 13, 19, 16, -1
  • 7. | Main |< C & C++ if and if-else 2 | C & C++ if and if-else 4 >| Site Index | Download | The C Selection if, if-else, if-else-if, break, conditional/ternary operator and switch-case-break: Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 tenouk.com, 2007