Advertisement
Guest User

Untitled

a guest
Nov 17th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.31 KB | None | 0 0
  1. for(int i = 0;i<n;i++){
  2.     //insert codek mtaa el région
  3.  
  4.     int found = 0;
  5.     do{
  6.         found = 0;
  7.         printf("Saisir un code unique (centre %d) :\n",i);
  8.         scanf("%d",&_code);
  9.         for(int j=0;j<i;j++){
  10.             if(centre[j].codeunq == _code){
  11.                 found = 1;
  12.             }
  13.         }
  14.     }
  15.     while(found == 1);
  16.     centre[i].codeunq = _code;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement