Programming Constructs

  • In any programming mtd’s are used are called constructs. These are 3 types ..

  • Sequential
  • Selection
  • Iteration


  • Selection:

    these are 5 types .
  • Simple if
  • If Else
  • Multiple Ifs
  • Nested Ifs
  • Swich_Case


  • a) Simple If

    If(condition) {
    	Statements
    }
    

    b) If Else

    if  ( condition) {
    	Statement
    } else {
    	Statement
    }
    

    c) Multiple Ifs

    If (condition) {
    	Statement
    }
    If(condition) {
    	Statement
    }

    d) Nested Ifs


    If (condition) {
    	Statement
    } else if ( condition) {
    	Statement
    }
    :
    Else {
    	Statement
    		:
    }