Guest User

Untitled

a guest
Jan 23rd, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. int check_range(char a[])
  2. {
  3. size_t i;
  4. size_t y;
  5. char temp3[]
  6. int increase = 0;
  7. for(i = 0; a[i] != '\0'; i++)
  8. {
  9. if(a[i] == '-' && a[i - 1] < a[i + 1])
  10. {
  11. for(y = 0; y <(a[i + 1] + a[i - 1]); y++)
  12.  
  13. {
  14. increase++;
  15. temp3[y] = a[i] + increase;
  16. }
  17. temp3[y] = '\0';
  18. }
  19. }
  20. /* copy into temp or temp1 */
  21. for(y = 0; temp3[y] != '\0'; y++)
  22. a[y] = temp3[y];
  23. a[y] = '\0';
  24.  
  25. return 0;
  26. }
Add Comment
Please, Sign In to add comment