Monday, 30 June 2014

A SIMPLE WHILE LOOP APPLICATION USING BREAKS

SIMPLE WHILE LOOP APPLICATION USING BREAKS








#include <stdio.h>

main()
{
    int i = 10;

    while ( i > 0 )
    {
       printf("Hello %d\n", i );
       i = i -1;
       if( i == 6 )
       {
          break;
       }
    }
}





OUTPUT-         Hello 10
Hello 9
Hello 8
Hello 7

No comments:

Post a Comment