Break Keyword in C Programming

Write a program that shows the use of Break Keyword

18 comments:

  1. #include
    #include
    char funcx(char);
    int main()
    {
    int shohan,n;
    int (*pFn)(char);
    pFn=funcx;
    printf("\n Enter character a,b,c,d:");
    scanf("%c",&n);
    shohan=(*pFn)(n);
    getch();
    return 0;

    }

    char funcx(char n)
    {
    switch(n)
    {
    case 'a' :
    printf("\n Your choice is salman");
    break;

    case 'b' :
    printf("\n Your choice is shuvo");
    break;

    case 'c' :
    printf("\nYour choice is saad");
    break;

    case 'd' :
    printf("\n Your choice is mennath");
    break;

    default:
    printf("\n Your choiece is not so smart");
    break;
    }

    }

    ReplyDelete
  2. #include
    #include
    char funcx(char);
    int main()
    {
    int s,n;
    int (*pFn)(char);
    pFn=funcx;
    printf("\n Enter character a,b,c,d:");
    scanf("%c",&n);
    s=(*pFn)(n);
    getch();
    return 0;

    }

    char funcx(char n)
    {
    switch(n)
    {
    case 'a' :
    printf("\n Your choice is AMERICA");
    break;

    case 'b' :
    printf("\n Your choice is BANGLADESH");
    break;

    case 'c' :
    printf("\nYour choice is CANADA");
    break;

    case 'd' :
    printf("\n Your choice is DENMARK");
    break;

    default:
    printf("\nTHANK YOU,YOU LOKING NICE\n PLEASE CHOICE AGAIN");
    break;
    }

    }

    ReplyDelete
  3. #include
    main()
    {
    int ch;
    float V,I,R,sum=0;
    printf("press v for voltage,i for current,r for resistance : ");
    scanf("%c",&ch);
    switch (ch)
    {
    case 'v':
    printf("enter the current : ");
    scanf("%f",&I);
    printf("enter the resistance : ");
    scanf("%f",&R);
    sum=I*R;
    printf("%f",sum);
    break;

    case 'i':
    printf("enter the voltage : ");
    scanf("%f",&V);
    printf("enter the resistance : ");
    scanf("%f",&R);
    sum=V/R;
    printf("%f",sum);
    break;
    case 'r':
    printf("enter the voltage : ");
    scanf("%f",&V);
    printf("enter the current : ");
    scanf("%f",&I);
    sum=V/I;
    printf("%f",sum);
    break;
    }
    }

    ReplyDelete
  4. #include
    main()
    {
    char ch;
    float I,Q,T,sum=0;
    printf("For current press i,q for coulumb,t for time\n");
    scanf("%c",&ch);
    switch(ch)
    {
    case 'i':
    printf("enter the coulumb:");
    scanf("%f",&Q);
    printf("enter the time:");
    scanf("%f",&T);
    sum=Q/T;
    printf("%f",sum);
    break;
    case 'q':
    printf("enter the current:");
    scanf("%f",&I);
    printf("enter the time:");
    scanf("%f",&T);
    sum=I*T;
    printf("%f",sum);
    break;
    case 't':
    printf("enter the coulumb:");
    scanf("%f",&Q);
    printf("enter the current:");
    scanf("%f",&I);
    sum=Q/I;
    printf("%f",sum);
    break;
    }
    }

    ReplyDelete
  5. #include
    #include
    char funcx(char);
    int main()
    {
    int s,n;
    int (*ptr)(char);
    ptr=funcx;
    printf("\n Enter character a,b,c,d:");
    scanf("%c",&n);
    s=(*ptr)(n);
    getch();
    return 0;

    }

    char funcx(char n)
    {
    switch(n)
    {
    case 'a' :
    printf("\n Your choice is APPLE");
    break;

    case 'b' :
    printf("\n Your choice is BALL");
    break;

    case 'c' :
    printf("\nYour choice is CAT");
    break;

    case 'd' :
    printf("\n Your choice is DOLL");
    break;

    default:
    printf("\nTHANK YOU,YOU LOKING NICE\n PLEASE CHOICE AGAIN\n I Think your choice is not right");
    break;
    }

    }

    ReplyDelete
  6. #include
    #include
    char funcx(char);
    int main()
    {
    int s,n;
    int (*ptr)(char);
    ptr=funcx;
    printf("\n Enter character a,b,c,d:");
    scanf("%c",&n);
    s=(*ptr)(n);
    getch();
    return 0;

    }

    char funcx(char n)
    {
    switch(n)
    {
    case 'a' :
    printf("\n Your choice is APPLE");
    break;

    case 'b' :
    printf("\n Your choice is BALL");
    break;

    case 'c' :
    printf("\nYour choice is CAT");
    break;

    case 'd' :
    printf("\n Your choice is DOLL");
    break;

    default:
    printf("\nTHANK YOU,YOU LOKING NICE\n PLEASE CHOICE AGAIN\n I Think your choice is not right");
    break;
    }

    }

    ReplyDelete
  7. #include
    #include
    char funcx(char);
    int main()
    {
    int s,n;
    int (*ptr)(char);
    ptr=funcx;
    printf("\n Enter character a,b,c,d:");
    scanf("%c",&n);
    s=(*ptr)(n);
    getch();
    return 0;

    }

    char funcx(char n)
    {
    switch(n)
    {
    case 'a' :
    printf("\n Your choice is APPLE");
    break;

    case 'b' :
    printf("\n Your choice is BALL");
    break;

    case 'c' :
    printf("\nYour choice is CAT");
    break;

    case 'd' :
    printf("\n Your choice is DOLL");
    break;

    default:
    printf("\nTHANK YOU,YOU LOKING NICE\n PLEASE CHOICE AGAIN\n I Think your choice is not right");
    break;
    }

    }

    ReplyDelete
  8. #include
    #include
    char funcx(char);
    int main()
    {
    int s,n;
    int (*ptr)(char);
    ptr=funcx;
    printf("\n Enter character a,b,c,d:");
    scanf("%c",&n);
    s=(*ptr)(n);
    getch();
    return 0;

    }

    char funcx(char n)
    {
    switch(n)
    {
    case 'a' :
    printf("\n Your choice is APPLE");
    break;

    case 'b' :
    printf("\n Your choice is BALL");
    break;

    case 'c' :
    printf("\nYour choice is CAT");
    break;

    case 'd' :
    printf("\n Your choice is DOLL");
    break;

    default:
    printf("\nTHANK YOU,YOU LOKING NICE\n PLEASE CHOICE AGAIN\n I Think your choice is not right");
    break;
    }

    }

    ReplyDelete
  9. #include
    #include
    char funcx(char);
    int main()
    {
    int s,n;
    int (*ptr)(char);
    ptr=funcx;
    printf("\n Enter character a,b,c,d:");
    scanf("%c",&n);
    s=(*ptr)(n);
    getch();
    return 0;

    }

    char funcx(char n)
    {
    switch(n)
    {
    case 'a' :
    printf("\n Your choice is APPLE");
    break;

    case 'b' :
    printf("\n Your choice is BALL");
    break;

    case 'c' :
    printf("\nYour choice is CAT");
    break;

    case 'd' :
    printf("\n Your choice is DOLL");
    break;

    default:
    printf("\nTHANK YOU,YOU LOKING NICE\n PLEASE CHOICE AGAIN\n I Think your choice is not right");
    break;
    }

    }

    ReplyDelete
  10. #include
    #include
    char funcx(char);
    int main()
    {
    int s,n;
    int (*ptr)(char);
    ptr=funcx;
    printf("\n Enter character a,b,c,d:");
    scanf("%c",&n);
    s=(*ptr)(n);
    getch();
    return 0;

    }

    char funcx(char n)
    {
    switch(n)
    {
    case 'a' :
    printf("\n Your choice is APPLE");
    break;

    case 'b' :
    printf("\n Your choice is BALL");
    break;

    case 'c' :
    printf("\nYour choice is CAT");
    break;

    case 'd' :
    printf("\n Your choice is DOLL");
    break;

    default:
    printf("\nTHANK YOU,YOU LOKING NICE\n PLEASE CHOICE AGAIN\n I Think your choice is not right");
    break;
    }

    }

    ReplyDelete

  11. char funcx(char);
    int main()
    {
    int s,n;
    int (*ptr)(char);
    ptr=funcx;
    printf("\n Enter character a,b,c,d:");
    scanf("%c",&n);
    s=(*ptr)(n);
    getch();
    return 0;

    }

    char funcx(char n)
    {
    switch(n)
    {
    case 'a' :
    printf("\n Your choice is APPLE");
    break;

    case 'b' :
    printf("\n Your choice is BALL");
    break;

    case 'c' :
    printf("\nYour choice is CAT");
    break;

    case 'd' :
    printf("\n Your choice is DOLL");
    break;

    default:
    printf("\nTHANK YOU,YOU LOKING NICE\n PLEASE CHOICE AGAIN\n I Think your choice is not right");
    break;
    }

    }

    ReplyDelete
  12. #include
    #include
    char funcx(char);
    int main()
    {
    int s,n;
    int (*ptr)(char);
    ptr=funcx;
    printf("\n Enter character a,b,c,d:");
    scanf("%c",&n);
    s=(*ptr)(n);
    getch();
    return 0;

    }

    char funcx(char n)
    {
    switch(n)
    {
    case 'a' :
    printf("\n Your choice is APPLE");
    break;

    case 'b' :
    printf("\n Your choice is BALL");
    break;

    case 'c' :
    printf("\nYour choice is CAT");
    break;

    case 'd' :
    printf("\n Your choice is DOLL");
    break;

    default:
    printf("\nTHANK YOU,YOU LOKING NICE\n PLEASE CHOICE AGAIN\n I Think your choice is not right");
    break;
    }

    }

    ReplyDelete
  13. #include
    #include
    char funcx(char);
    int main()
    {
    int s,n;
    int (*ptr)(char);
    ptr=funcx;
    printf("\n Enter character a,b,c,d:");
    scanf("%c",&n);
    s=(*ptr)(n);
    getch();
    return 0;

    }

    char funcx(char n)
    {
    switch(n)
    {
    case 'a' :
    printf("\n Your choice is APPLE");
    break;

    case 'b' :
    printf("\n Your choice is BALL");
    break;

    case 'c' :
    printf("\nYour choice is CAT");
    break;

    case 'd' :
    printf("\n Your choice is DOLL");
    break;

    default:
    printf("\nTHANK YOU,YOU LOKING NICE\n PLEASE CHOICE AGAIN\n I Think your choice is not right");
    break;
    }

    }

    ReplyDelete
  14. char funcx(char);
    int main()
    {
    int s,n;
    int (*ptr)(char);
    ptr=funcx;
    printf("\n Enter character a,b,c,d:");
    scanf("%c",&n);
    s=(*ptr)(n);
    getch();
    return 0;

    }

    char funcx(char n)
    {
    switch(n)
    {
    case 'a' :
    printf("\n Your choice is APPLE");
    break;

    case 'b' :
    printf("\n Your choice is BALL");
    break;

    case 'c' :
    printf("\nYour choice is CAT");
    break;

    case 'd' :
    printf("\n Your choice is DOLL");
    break;

    default:
    printf("\nTHANK YOU,YOU LOKING NICE\n PLEASE CHOICE AGAIN\n I Think your choice is not right");
    break;
    }

    }

    ReplyDelete
  15. #include
    main()
    {
    int c;
    scanf("%d",&c);
    char Bangla,English,Deutsch;
    printf("press 1 for Bangla\n");
    printf("press 2 for English\n");
    printf("press 3 for Deutsch\n");
    switch(c)
    {
    case 1:
    printf("your coice is Bangla");
    break;
    case 2:
    printf("your choice is English");
    break;
    case 3:
    printf("your choice is Deutsch");
    break;
    }

    }

    ReplyDelete
  16. #include
    main()
    {
    int c;
    scanf("%d",&c);
    char Bangla,English,Deutsch;
    printf("press 1 for Bangla\n");
    printf("press 2 for English\n");
    printf("press 3 for Deutsch\n");
    switch(c)
    {
    case 1:
    printf("your coice is Bangla");
    break;
    case 2:
    printf("your choice is English");
    break;
    case 3:
    printf("your choice is Deutsch");
    break;
    }

    }

    ReplyDelete
  17. //Break Keyword in C Programming
    #include
    main()
    {
    int i,cnt=0;
    for(i=1; ;i++)
    {
    if (i%2==0)
    {
    cnt=cnt+1;
    if (cnt<=10)
    printf("%d ",i);
    else
    break;
    }
    }
    }

    ReplyDelete
  18. //Break Keyword in C Programming
    #include
    main()
    {
    int c;
    while(scanf("%d",c))
    {
    if(c%2==0)
    printf("%d",c is a even number);
    if(c==0)
    break;
    }
    }

    ReplyDelete