Thursday, March 3, 2016

Break example in C

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
#include <stdio.h>

main()
{
 int n;
 printf("Enter the Integers:");
  while(1)
  {
   scanf("%d",&n);
    if(n==30)
    break;
  }
 printf("30 is entered so no more.");
 
}

No comments:

Post a Comment

Thank you for commenting. Please wait for response :)