SlideShare a Scribd company logo
1 of 55
C
loop
statement
loop statement



    1.        for
    for
                                          for
                  for
                    for
for (expression1; expression2; expression3)
          expression1
          statement;
                          expression2

for (expression1; expression2; expression3)

{                         expression3
for




4.1         for
for
      1        10
 /*         for1.c     */
#include<stdio.h>
        /*           1 */
#include<conio.h>
    /*            2 */
void main(void)
        /*           3 */
{
        /*           4 */
    int num;
        /*           5 */
    clrscr(
);
        /*           6 */
    for (num=1; num<=10;
7     for (num = 1; num
<=10; num++)
     num     1                     num <=
10
   8                 for                9
         8       printf( )
     num

        9        printf( )

        10
2.         while
               while

      for                       while

                     while
                   while
while (expression) statement;

while (expression)
{
statement(s);
}

  expression

      while
while
while
        1      10
/* while1.c          */
#include<stdio.h>                 /*        1 */
#include<conio.h>                 /*        2 */
void main(void)                        /*
   3 */
{                                      /*
   4 */
    int n=1;                           /*
   5 */
    float sum =0 , avg;                /*
   6 */
    clrscr( );                         /*
   7 */
    while ( n < 11 )                   /*
   8 */
    {                                  /*
   9 */
         sum+=n;                       /*
   10 */
8         while (n < 11)

     while                     n < 11
                                   loop while
10           11
                                   n < 11
       loop while                               13
       18
        10      11
                  while
             sum                   n        1
        13     18
                  while
3.      do while
             do while
                while
      do while
                         1


      do while
                   do while
do{
statement(s);
} while (expression);
                           do while
                        do while
                                      2
do while
do while
      main memu                                     5

 /*dowhile1.c */
             #include<stdio.h>
          /*            1 */
#include<conio.h>
          /*            2 */
void main(void)                                /*
    3 */
{
/*             4 */
char choice;
          /*            5 */
clrscr();
          /*            6 */
do {
          /*            7 */
printf("nn******* MAIN MENU *******n");     /*
    8 */
printf("*************************nn");       /*
    9 */
7      do

        loop do                             {
}           8   16
    1
        while              17
                 loop

          17         while (choice!=‘5‘);

        choice
                                        5
         (‘5‘
4.         break
        break                      for   while
do while               switch
       break                 for
/*       break.c */
   #include<stdio.h>
        /*          1 */
#include<conio.h>
        /*          2 */
void main(void)
        /*          3 */
{
        /*          4 */
int j;
        /*          5 */
clrscr();
        /*          6 */
for (j=1; j<=20; j++) {
7            for (j = 1; j
<=20; j++)
               j       1
   1 tab
           9           if (j == 10) break;
           j               10                 10
                   (break)
    loop for
      1      20                       break
      1      10
         11           12
                        for              7
5.      continues
             continue
               for    while   do while

                                continue
     for
/*continue.c*/
#include<stdio.h>
         /*         1 */
#include<conio.h>
         /*         2 */
void main(void)
         /*         3 */
{
         /*         4 */
int j;
         /*         5 */
clrscr();
         /*         6 */
7        for (j=1; j<=20; j++)

 j        1      20                        1 tab
      9        if (j==5) {j=j+10; continue;}
               j            5
    5            j     10
    (continue)                 7
j     1      16
    1     20
  6     15
      11       12
                   for             7
decision statements)


                              if, if
else,             else if (            nested if)
        switch
         1.       if
if

                       if

if (expression) statement;

if (expression)
{
statement(s);
}
if
if

/* if1.C. */
#include
<stdio.h>
       /*
  include
<conio.h>
       /*
  include
<ctype.h>
       /*
   Capitalize Keys read from The Keyboard
*/                    /*
main()
                  /*


char
include <ctype.h>
  toupper( )




any_char
             if (any_char >= ‘a’)
               any_char
                            a‘
if else
       if else

                    if else

if (expression) {
statementA(s);
}
else {
statementB(s);
}

                             if else
                    expression)
             A (statementA(s);)
               B (statementB(s);)
if else
if else

/*        if_else1.c      */
#include
<stdio.h>                                            /*

 include
<conio.h>                                            /*

 include
<ctype.h>                                            /*

  Capitalize Keys read from The Keyboard
*/                   /*
main()
  /*


   char
any_char;                                            /*
if (any_char <
‘a’)
     a’                               Sorry, I
can not capitalize that.


              else


                  toupper( )
else if (        nested if)
        else if
      if else

   nested if
                           nested if         else if
else if (expression) {
statementA(s);
}
else if (expression){
statementB(s);
}
else if (expression){

                         nested if
                  nested if
                     nested if
nested if


/* nestif1.c        */
#include<stdio.h>
   /*
  include<conio.h>
/*
  include<stdlib.h>
 /*
void
main(void)                           /*



   int
score, n, i;                         /*

    char
if ( score >= 80
)                                  /*
             grade =
'A';                                    /*
             else if ( score >= 70
)                         /*
                 grade =
'B';                              /*
             else if ( score >= 60
)                        /*
                 grade =
'C';                              /*
             else if ( score >= 50
)                       /*
                 grade =
'D';                            /*
             else grade =
include <stdlib.h>
atoi( )

n = atoi(gets(numstr));
                          n
            for (i=1; i<=n; i++)

n                                  for
    loop for
         for


                      score
            if ( score >= 80 )
else if ( score >= 70 )
              score
                                  grade       B

            else if ( score >= 60 )
              score
                                  grade       C

            else if ( score >= 50 )
              score
                                  grade       D

            else      grade = ‘F’;
grade   F

                        score             i
switch
       switch

   nested if                 switch
     nested if

                    switch

switch (expression) {
case expression1:
statement(s); break;
case expression2:
statement(s); break;
…..
case expressionN:
statement(s); break;
default:
statement(s);
expression
     expression1, expression2, …, expressionN

expression1, expression2, …, expressionN
                    , , , …, N
break                               case
             switch                        case
                     break     case
   case                      case
      break
default            expression
                           default     default
        break               default
      switch

                            switch
      1)           switch              case)
     break                                        case
switch

/*       switch.c        */
#include<stdio.h>                           /*

 include<conio.h>                           /*

 include<stdlib.h>                           /*

 include<ctype.h>                           /*

void
main(void)                             /*



     int n, i;
/*
     float gradepoint;
switch(toupper(grade))
{                                 /*
           case
'A':                                         /*

              gradepoint = 4.0;
break;                     /*
           case
'B':                                   /*
              gradepoint = 3.0;
break;                     /*
           case
'C':                                    /*
              gradepoint = 2.0;
break;                     /*
           case
'D':                                   /*
              gradepoint = 1.0;
n
         for (i = 1; i < n; i++)
                                    n
                              for
        loop for


grade

 switch
gradepoint


enter
loop             switch
             loop for

                   switch
                    A
gradepoint
    break)                  A
             B
gradepoint
    break)                  B
             C
gradepoint
    break)                  C
             D
gradepoint
goto statements)



     goto         label



                     goto      label
             goto
                                label
                            goto        label

goto labelname;

labelname:
labelname      label




goto    label




goto    label
goto          label
        label
/*     gotolabe.c       */
#include<stdio.h>
          /*
  include<conio.h>
          /*
void
main(void)
         /*


   int i, j, k;
         /*
   j=i=2;
         /*
   clrscr( );
         /*
   loop: k = i*j;
         /*
loop :          quit
:                           label
      loop           quit
                            goto loop;
                             label           loop
        if (i < 7)

                                              if

              goto quit;
             label               quit
                            quit : printf (“ n Thank You !
“);      label              quit       label
      Thank You !
การเขียนคำสั่งควบคุมแบบวนซ้ำ ppt

More Related Content

What's hot

CROCHET - Checkpoint Rollback in JVM (ECOOP 2018)
CROCHET - Checkpoint Rollback in JVM (ECOOP 2018)CROCHET - Checkpoint Rollback in JVM (ECOOP 2018)
CROCHET - Checkpoint Rollback in JVM (ECOOP 2018)jon_bell
 
C++ Lambda and concurrency
C++ Lambda and concurrencyC++ Lambda and concurrency
C++ Lambda and concurrency명신 김
 
realpathキャッシュと OPcacheの面倒すぎる関係
realpathキャッシュと OPcacheの面倒すぎる関係realpathキャッシュと OPcacheの面倒すぎる関係
realpathキャッシュと OPcacheの面倒すぎる関係Yoshio Hanawa
 
Welcome to Modern C++
Welcome to Modern C++Welcome to Modern C++
Welcome to Modern C++Seok-joon Yun
 
Pro typescript.ch03.Object Orientation in TypeScript
Pro typescript.ch03.Object Orientation in TypeScriptPro typescript.ch03.Object Orientation in TypeScript
Pro typescript.ch03.Object Orientation in TypeScriptSeok-joon Yun
 
Coroutines in Kotlin. UA Mobile 2017.
Coroutines in Kotlin. UA Mobile 2017.Coroutines in Kotlin. UA Mobile 2017.
Coroutines in Kotlin. UA Mobile 2017.UA Mobile
 
Falcon初印象
Falcon初印象Falcon初印象
Falcon初印象勇浩 赖
 
Institute management
Institute managementInstitute management
Institute managementvarun arora
 
PHP Performance SfLive 2010
PHP Performance SfLive 2010PHP Performance SfLive 2010
PHP Performance SfLive 2010De Cock Xavier
 
Introduction to Compiler Development
Introduction to Compiler DevelopmentIntroduction to Compiler Development
Introduction to Compiler DevelopmentLogan Chien
 
computer notes - Recursion
computer notes -  Recursioncomputer notes -  Recursion
computer notes - Recursionecomputernotes
 
Practical JavaScript Programming - Session 6/8
Practical JavaScript Programming - Session 6/8Practical JavaScript Programming - Session 6/8
Practical JavaScript Programming - Session 6/8Wilson Su
 
An other world awaits you
An other world awaits youAn other world awaits you
An other world awaits you信之 岩永
 
Digital Voltmeter displaying voltage level on a seven segment display and com...
Digital Voltmeter displaying voltage level on a seven segment display and com...Digital Voltmeter displaying voltage level on a seven segment display and com...
Digital Voltmeter displaying voltage level on a seven segment display and com...Karthik Rathinavel
 

What's hot (20)

CROCHET - Checkpoint Rollback in JVM (ECOOP 2018)
CROCHET - Checkpoint Rollback in JVM (ECOOP 2018)CROCHET - Checkpoint Rollback in JVM (ECOOP 2018)
CROCHET - Checkpoint Rollback in JVM (ECOOP 2018)
 
C++ Lambda and concurrency
C++ Lambda and concurrencyC++ Lambda and concurrency
C++ Lambda and concurrency
 
realpathキャッシュと OPcacheの面倒すぎる関係
realpathキャッシュと OPcacheの面倒すぎる関係realpathキャッシュと OPcacheの面倒すぎる関係
realpathキャッシュと OPcacheの面倒すぎる関係
 
Welcome to Modern C++
Welcome to Modern C++Welcome to Modern C++
Welcome to Modern C++
 
Pro typescript.ch03.Object Orientation in TypeScript
Pro typescript.ch03.Object Orientation in TypeScriptPro typescript.ch03.Object Orientation in TypeScript
Pro typescript.ch03.Object Orientation in TypeScript
 
Embedding perl
Embedding perlEmbedding perl
Embedding perl
 
Coroutines in Kotlin. UA Mobile 2017.
Coroutines in Kotlin. UA Mobile 2017.Coroutines in Kotlin. UA Mobile 2017.
Coroutines in Kotlin. UA Mobile 2017.
 
Falcon初印象
Falcon初印象Falcon初印象
Falcon初印象
 
Institute management
Institute managementInstitute management
Institute management
 
Workshop Swift
Workshop Swift Workshop Swift
Workshop Swift
 
Forkexpe
ForkexpeForkexpe
Forkexpe
 
Lampiran
LampiranLampiran
Lampiran
 
PHP Performance SfLive 2010
PHP Performance SfLive 2010PHP Performance SfLive 2010
PHP Performance SfLive 2010
 
Introduction to Compiler Development
Introduction to Compiler DevelopmentIntroduction to Compiler Development
Introduction to Compiler Development
 
computer notes - Recursion
computer notes -  Recursioncomputer notes -  Recursion
computer notes - Recursion
 
Practical JavaScript Programming - Session 6/8
Practical JavaScript Programming - Session 6/8Practical JavaScript Programming - Session 6/8
Practical JavaScript Programming - Session 6/8
 
Michael kontopoulo1s
Michael kontopoulo1sMichael kontopoulo1s
Michael kontopoulo1s
 
An other world awaits you
An other world awaits youAn other world awaits you
An other world awaits you
 
Digital Voltmeter displaying voltage level on a seven segment display and com...
Digital Voltmeter displaying voltage level on a seven segment display and com...Digital Voltmeter displaying voltage level on a seven segment display and com...
Digital Voltmeter displaying voltage level on a seven segment display and com...
 
3D-DRESD Lorenzo Pavesi
3D-DRESD Lorenzo Pavesi3D-DRESD Lorenzo Pavesi
3D-DRESD Lorenzo Pavesi
 

Similar to การเขียนคำสั่งควบคุมแบบวนซ้ำ ppt

-- This is the shell-c Test- --shell -test sub #include -ctype-h- -- C.pdf
-- This is the shell-c Test- --shell -test sub #include -ctype-h- -- C.pdf-- This is the shell-c Test- --shell -test sub #include -ctype-h- -- C.pdf
-- This is the shell-c Test- --shell -test sub #include -ctype-h- -- C.pdfAdrianEBJKingr
 
แก้ไขงานคอม1
แก้ไขงานคอม1แก้ไขงานคอม1
แก้ไขงานคอม1Ykk'Famemy Jackson
 
C lecture 4 nested loops and jumping statements slideshare
C lecture 4 nested loops and jumping statements slideshareC lecture 4 nested loops and jumping statements slideshare
C lecture 4 nested loops and jumping statements slideshareGagan Deep
 
write the TODO part of the program.docx
write the TODO part of the program.docxwrite the TODO part of the program.docx
write the TODO part of the program.docxannetnash8266
 
assign4assign4_part1bonnie.c This is a file system ben.docx
assign4assign4_part1bonnie.c  This is a file system ben.docxassign4assign4_part1bonnie.c  This is a file system ben.docx
assign4assign4_part1bonnie.c This is a file system ben.docxfestockton
 
Game unleashedjavascript
Game unleashedjavascriptGame unleashedjavascript
Game unleashedjavascriptReece Carlson
 
FP 201 - Unit 3 Part 2
FP 201 - Unit 3 Part 2FP 201 - Unit 3 Part 2
FP 201 - Unit 3 Part 2rohassanie
 
Compiler Optimization Presentation
Compiler Optimization PresentationCompiler Optimization Presentation
Compiler Optimization Presentation19magnet
 

Similar to การเขียนคำสั่งควบคุมแบบวนซ้ำ ppt (20)

-- This is the shell-c Test- --shell -test sub #include -ctype-h- -- C.pdf
-- This is the shell-c Test- --shell -test sub #include -ctype-h- -- C.pdf-- This is the shell-c Test- --shell -test sub #include -ctype-h- -- C.pdf
-- This is the shell-c Test- --shell -test sub #include -ctype-h- -- C.pdf
 
Lab 6
Lab 6Lab 6
Lab 6
 
Sbaw091006
Sbaw091006Sbaw091006
Sbaw091006
 
แก้ไขงานคอม1
แก้ไขงานคอม1แก้ไขงานคอม1
แก้ไขงานคอม1
 
Lab loop
Lab loopLab loop
Lab loop
 
Lecture16
Lecture16Lecture16
Lecture16
 
C lecture 4 nested loops and jumping statements slideshare
C lecture 4 nested loops and jumping statements slideshareC lecture 4 nested loops and jumping statements slideshare
C lecture 4 nested loops and jumping statements slideshare
 
week-15x
week-15xweek-15x
week-15x
 
C++11 talk
C++11 talkC++11 talk
C++11 talk
 
write the TODO part of the program.docx
write the TODO part of the program.docxwrite the TODO part of the program.docx
write the TODO part of the program.docx
 
MUST CS101 Lab11
MUST CS101 Lab11 MUST CS101 Lab11
MUST CS101 Lab11
 
Let's golang
Let's golangLet's golang
Let's golang
 
assign4assign4_part1bonnie.c This is a file system ben.docx
assign4assign4_part1bonnie.c  This is a file system ben.docxassign4assign4_part1bonnie.c  This is a file system ben.docx
assign4assign4_part1bonnie.c This is a file system ben.docx
 
Game unleashedjavascript
Game unleashedjavascriptGame unleashedjavascript
Game unleashedjavascript
 
3 rd animation
3 rd animation3 rd animation
3 rd animation
 
FP 201 - Unit 3 Part 2
FP 201 - Unit 3 Part 2FP 201 - Unit 3 Part 2
FP 201 - Unit 3 Part 2
 
About Go
About GoAbout Go
About Go
 
Compiler Optimization Presentation
Compiler Optimization PresentationCompiler Optimization Presentation
Compiler Optimization Presentation
 
Kotlin
KotlinKotlin
Kotlin
 
Bubble sort
Bubble sortBubble sort
Bubble sort
 

More from Little Junney

งานย่อย 5
งานย่อย 5งานย่อย 5
งานย่อย 5Little Junney
 
งานย่อย 1
งานย่อย 1งานย่อย 1
งานย่อย 1Little Junney
 
โครงงานคณิตศาสตร์
โครงงานคณิตศาสตร์โครงงานคณิตศาสตร์
โครงงานคณิตศาสตร์Little Junney
 
งานย่อย 1
งานย่อย 1งานย่อย 1
งานย่อย 1Little Junney
 
โครงงานคณิตศาสตร์
โครงงานคณิตศาสตร์โครงงานคณิตศาสตร์
โครงงานคณิตศาสตร์Little Junney
 
งานย อยท _6
งานย อยท _6งานย อยท _6
งานย อยท _6Little Junney
 
งานย่อย 6
งานย่อย 6งานย่อย 6
งานย่อย 6Little Junney
 
It newsเกมส์
It newsเกมส์It newsเกมส์
It newsเกมส์Little Junney
 

More from Little Junney (11)

งานย่อย 5
งานย่อย 5งานย่อย 5
งานย่อย 5
 
งานย่อย 1
งานย่อย 1งานย่อย 1
งานย่อย 1
 
โครงงานคณิตศาสตร์
โครงงานคณิตศาสตร์โครงงานคณิตศาสตร์
โครงงานคณิตศาสตร์
 
งานย่อย 1
งานย่อย 1งานย่อย 1
งานย่อย 1
 
โครงงานคณิตศาสตร์
โครงงานคณิตศาสตร์โครงงานคณิตศาสตร์
โครงงานคณิตศาสตร์
 
งานย อยท _6
งานย อยท _6งานย อยท _6
งานย อยท _6
 
งานย่อย 6
งานย่อย 6งานย่อย 6
งานย่อย 6
 
It news
It newsIt news
It news
 
It newsเกมส์
It newsเกมส์It newsเกมส์
It newsเกมส์
 
It news 2012
It news 2012It news 2012
It news 2012
 
It news
It newsIt news
It news
 

การเขียนคำสั่งควบคุมแบบวนซ้ำ ppt

  • 1.
  • 2. C
  • 4. loop statement 1. for for for for for for (expression1; expression2; expression3) expression1 statement; expression2 for (expression1; expression2; expression3) { expression3
  • 5. for 4.1 for
  • 6. for 1 10 /* for1.c */ #include<stdio.h> /* 1 */ #include<conio.h> /* 2 */ void main(void) /* 3 */ { /* 4 */ int num; /* 5 */ clrscr( ); /* 6 */ for (num=1; num<=10;
  • 7.
  • 8. 7 for (num = 1; num <=10; num++) num 1 num <= 10 8 for 9 8 printf( ) num 9 printf( ) 10
  • 9. 2. while while for while while while while (expression) statement; while (expression) { statement(s); } expression while
  • 10. while
  • 11. while 1 10 /* while1.c */ #include<stdio.h> /* 1 */ #include<conio.h> /* 2 */ void main(void) /* 3 */ { /* 4 */ int n=1; /* 5 */ float sum =0 , avg; /* 6 */ clrscr( ); /* 7 */ while ( n < 11 ) /* 8 */ { /* 9 */ sum+=n; /* 10 */
  • 12.
  • 13. 8 while (n < 11) while n < 11 loop while 10 11 n < 11 loop while 13 18 10 11 while sum n 1 13 18 while
  • 14. 3. do while do while while do while 1 do while do while do{ statement(s); } while (expression); do while do while 2
  • 16. do while main memu 5 /*dowhile1.c */ #include<stdio.h> /* 1 */ #include<conio.h> /* 2 */ void main(void) /* 3 */ { /* 4 */ char choice; /* 5 */ clrscr(); /* 6 */ do { /* 7 */ printf("nn******* MAIN MENU *******n"); /* 8 */ printf("*************************nn"); /* 9 */
  • 17.
  • 18. 7 do loop do { } 8 16 1 while 17 loop 17 while (choice!=‘5‘); choice 5 (‘5‘
  • 19. 4. break break for while do while switch break for /* break.c */ #include<stdio.h> /* 1 */ #include<conio.h> /* 2 */ void main(void) /* 3 */ { /* 4 */ int j; /* 5 */ clrscr(); /* 6 */ for (j=1; j<=20; j++) {
  • 20.
  • 21. 7 for (j = 1; j <=20; j++) j 1 1 tab 9 if (j == 10) break; j 10 10 (break) loop for 1 20 break 1 10 11 12 for 7
  • 22. 5. continues continue for while do while continue for /*continue.c*/ #include<stdio.h> /* 1 */ #include<conio.h> /* 2 */ void main(void) /* 3 */ { /* 4 */ int j; /* 5 */ clrscr(); /* 6 */
  • 23.
  • 24. 7 for (j=1; j<=20; j++) j 1 20 1 tab 9 if (j==5) {j=j+10; continue;} j 5 5 j 10 (continue) 7 j 1 16 1 20 6 15 11 12 for 7
  • 25.
  • 26. decision statements) if, if else, else if ( nested if) switch 1. if if if if (expression) statement; if (expression) { statement(s); }
  • 27. if
  • 28. if /* if1.C. */ #include <stdio.h> /* include <conio.h> /* include <ctype.h> /* Capitalize Keys read from The Keyboard */ /* main() /* char
  • 29.
  • 30. include <ctype.h> toupper( ) any_char if (any_char >= ‘a’) any_char a‘
  • 31. if else if else if else if (expression) { statementA(s); } else { statementB(s); } if else expression) A (statementA(s);) B (statementB(s);)
  • 33. if else /* if_else1.c */ #include <stdio.h> /* include <conio.h> /* include <ctype.h> /* Capitalize Keys read from The Keyboard */ /* main() /* char any_char; /*
  • 34.
  • 35. if (any_char < ‘a’) a’ Sorry, I can not capitalize that. else toupper( )
  • 36. else if ( nested if) else if if else nested if nested if else if else if (expression) { statementA(s); } else if (expression){ statementB(s); } else if (expression){ nested if nested if nested if
  • 37. nested if /* nestif1.c */ #include<stdio.h> /* include<conio.h> /* include<stdlib.h> /* void main(void) /* int score, n, i; /* char
  • 38. if ( score >= 80 ) /* grade = 'A'; /* else if ( score >= 70 ) /* grade = 'B'; /* else if ( score >= 60 ) /* grade = 'C'; /* else if ( score >= 50 ) /* grade = 'D'; /* else grade =
  • 39.
  • 40. include <stdlib.h> atoi( ) n = atoi(gets(numstr)); n for (i=1; i<=n; i++) n for loop for for score if ( score >= 80 )
  • 41. else if ( score >= 70 ) score grade B else if ( score >= 60 ) score grade C else if ( score >= 50 ) score grade D else grade = ‘F’; grade F score i
  • 42. switch switch nested if switch nested if switch switch (expression) { case expression1: statement(s); break; case expression2: statement(s); break; ….. case expressionN: statement(s); break; default: statement(s);
  • 43. expression expression1, expression2, …, expressionN expression1, expression2, …, expressionN , , , …, N break case switch case break case case case break default expression default default break default switch switch 1) switch case) break case
  • 44. switch /* switch.c */ #include<stdio.h> /* include<conio.h> /* include<stdlib.h> /* include<ctype.h> /* void main(void) /* int n, i; /* float gradepoint;
  • 45. switch(toupper(grade)) { /* case 'A': /* gradepoint = 4.0; break; /* case 'B': /* gradepoint = 3.0; break; /* case 'C': /* gradepoint = 2.0; break; /* case 'D': /* gradepoint = 1.0;
  • 46.
  • 47. n for (i = 1; i < n; i++) n for loop for grade switch gradepoint enter
  • 48. loop switch loop for switch A gradepoint break) A B gradepoint break) B C gradepoint break) C D gradepoint
  • 49.
  • 50. goto statements) goto label goto label goto label goto label goto labelname; labelname:
  • 51. labelname label goto label goto label
  • 52. goto label label /* gotolabe.c */ #include<stdio.h> /* include<conio.h> /* void main(void) /* int i, j, k; /* j=i=2; /* clrscr( ); /* loop: k = i*j; /*
  • 53.
  • 54. loop : quit : label loop quit goto loop; label loop if (i < 7) if goto quit; label quit quit : printf (“ n Thank You ! “); label quit label Thank You !