Advertisement
Guest User

Untitled

a guest
Sep 20th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. int enterArraySubMenu(unsigned int array[], int arrayLength)
  2. {
  3. if(arrayLength < 10)
  4. {
  5. for(arrayLength; arrayLength < 10; arrayLength++)
  6. {
  7. printf("\n\tEnter value # %d: ", arrayLength + 1);
  8. unsigned int scannedValue;
  9. scanf(" %u", &scannedValue);
  10.  
  11. if (scannedValue == 0)
  12. {
  13. return arrayLength;
  14. }
  15. array[arrayLength] = scannedValue;
  16. }
  17. }
  18. else{
  19. printf("\n\tData set is full, to input new numbers, please reset it using (r) from the main menu\n\n");
  20. }
  21. return arrayLength;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement