Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int check_range(char a[])
- {
- size_t i;
- size_t y;
- char temp3[]
- int increase = 0;
- for(i = 0; a[i] != '\0'; i++)
- {
- if(a[i] == '-' && a[i - 1] < a[i + 1])
- {
- for(y = 0; y <(a[i + 1] + a[i - 1]); y++)
- {
- increase++;
- temp3[y] = a[i] + increase;
- }
- temp3[y] = '\0';
- }
- }
- /* copy into temp or temp1 */
- for(y = 0; temp3[y] != '\0'; y++)
- a[y] = temp3[y];
- a[y] = '\0';
- return 0;
- }
Add Comment
Please, Sign In to add comment