GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
#include "typedef.h"1/**************************************************************************\2@---------------------------------------------------------------------------3@---------------------------------------------------------------------------4@ FILE: itoa.c5@---------------------------------------------------------------------------6@---------------------------------------------------------------------------7@8\**************************************************************************/910static void reverse(s)11char s[];12{13int c,i,j;14for(i=0, j=strlen(s)-1; i<j; i++, j--)15{16c = s[i];17s[i] = s[j];18s[j] = c;19}20}21222324/**************************************************************************\25@---------------------------------------------------------------------------26@ void itoa(n, s)27@ int n;28@ char s[];29@30@ changes the integer 'n' to a character 's', for example: 124 --> '124'31@---------------------------------------------------------------------------32@33\**************************************************************************/34void itoa(n, s)35int n;36char s[];37{38int i, sign;39if((sign = n) <0)40n = -n;41i=0;42do43{44s[i++] = n%10 + '0';45}while(( n /= 10) > 0);46if(sign < 0)47s[i++] = '-';48s[i] = '\0';49reverse(s);50}515253