C Break and Continue

Get Certified in C Programming and Take Your Skills to the Next Level

Program 1

// Break and continue Statement
#include<stdio.h>
#include<conio.h>
int main()
{
    system("cls");
     int i;
     for(i=1;i<=50;i++)
     {
        if(i%2==0)
        continue;
        printf("%d\n",i);
     }



//      int i,j,n,s,flag=0;
//     int a[10];
//     printf("Enter 10 elements in array");
//     for(i=0;i<10;i++)
//         scanf("%d",&a[i]);

//     printf("\n Enter a number for search");
//     scanf("%d",&s);
//     for(i=0;i<10;i++)
//     {
//         if(a[i]==s)
//         {
//               flag=1;
//               break;
//         }
//     }
//    if(flag==1)
//    printf("searching success");
//    else
//    printf("searching not success");













    //  for(i=1;i<=5;i++)
    //  {
    //     for(j=1;j<=5;j++)
    //     {
    //         printf("i=%d  j=%d",i,j);
    //         if(i==j)
    //         break;
    //     }
    //     if(i==j)
    //         break;
    //  }

    return 0;

}

 

Did we exceed your expectations?
If Yes, share your valuable feedback on Google

courses

DataFlair Team

DataFlair Team provides high-impact content on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. We make complex concepts easy to grasp, helping learners of all levels succeed in their tech careers.

Leave a Reply

Your email address will not be published. Required fields are marked *