Friday, February 11, 2011

LOOPING in 'C' and 'C++'

        A case when some of the statements are repeated again and again until the condition given becomes True or False is called looping. For this three statements are must :
Statement to initialize the variable
  1. Change the value of the variable choosen for condition
  2. a conditional statement
In 'C' or in 'C++' three looping statements are given :
  1. do---while(<condition>)
  2. while(<condition>){     }
  3. for(<initialization> ; <condition>; <increment/decrement>)