Advertisement
Guest User

Untitled

a guest
Apr 18th, 2019
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. printf("wprowadz liczby: ");
  2. for(int i=0; i<array_size; i++)
  3. {
  4. if((scanf("%f",(ptr_array_user_write+i))!=1) || (array_size<=0) || ((ptr_array_user_write+i)==NULL) )
  5. {
  6. printf("Incorrect input");
  7. return -1;
  8. }
  9. else if(sizeof *(ptr_array_user_write+i)!=sizeof(float))
  10. {
  11. printf("Incorrect input data");
  12. return -2;
  13. }
  14. else if(*(ptr_array_user_write+i)==stop_value)
  15. {
  16. return i;
  17. }
  18.  
  19. }
  20.  
  21. return array_size;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement