Pages

Saturday, March 29, 2014

C Program to demonstrate infinite loop

/*example of infinite loop*/
#include <stdio.h>
#include<stdlib.h>
int main()
{
    int n=-5;
    while(n!=0)
    {
        printf("%d \t",n);
        n--;
    }
    system ("pause");
    return 0;
}

No comments:

Post a Comment