#include <stdio.h>
// qui di seguito 2 cicli che fanno la stessa cosa e
// mostrano equivalenza for e while
int main() {
int i;
// forma WHILE
i = 0; // INI
while( i < 10 ) { // COND
printf("%d ",i);
i = i + 1; // INC
}
printf("\n");
// INI COND INC
for( i=0 ; i<10 ; i=i+1 ) {
printf("%d ",i);
}
printf("\n");
}
To embed this project on your website, copy the following code and paste it into your website's HTML: