[Frubar Paste] Hosted by SkyLime - Chat with us at XChannel IRC

Posted by Anonymous on Mon 13th Aug 21:25
download

  1. /*************************************
  2. *Function:      check()
  3. *Arguments:     int zahl, int arr2[6]
  4. *
  5. *Checks if the value of 'zahl' has already been used in the
  6. *array before and returns TRUE if so. Otherwise it returns FALSE.
  7. *************************************/
  8.  
  9. int check(int zahl,int arr2[6]){
  10.         int i = 0;
  11.         int duplikat = 0;
  12.         for(i = 0;i<6;i++){
  13.                 if(arr2[i] == zahl) duplikat = 1;
  14.         }
  15.         return duplikat;
  16. }


Submit a correction or amendment below. (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.



Remember my name in a cookie


Code: To highlight particular lines, prefix each line with @@.
Include comments to indicate what you need feedback on.