Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Exemple d’une boucle ‘for’ imbriquée


{filelink=13764}

 
#include <stdio.h>
 
int main(void)
{
  int i, j;
 
  for( i = 0; i < 100; i++) {
    for(j = 100; j > 0; j--) {
      printf("i=%d & j=%dn", i,j);
      if(j == i)
	  {
     printf("Collision!.n");
          break;
	  }
    }
 
  }
 
  return 0;
}

No comments yet.

Leave a Comment