example of break, continue, goto
(高顯忠, sjgau4311@gmail.com, 2011-07-25 07:24)
1樓
for i=1 to 20 step 1 do
if () then ...
next i
(高顯忠, sjgau4311@gmail.com, 2011-07-26 04:30)
2樓
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
int main()
{
int i;
for (i=1;i<=20;i++) {
// if ((i%3)==0) continue;
// if ((i%17)==0) break;
// if (i >= 13) goto L123;
printf("%5d, %5d, %12.8lf \n", i, i*i, sqrt(i));
}
L123: // ---
printf("\n\n\n *** %5d, %5d, %12.8lf \n", i, i*i, sqrt(i));
system("pause");
return(0);
}