לאחרונה התחלתי ללמוד C++ ועליי לכתוב תוכנה שמקבלת כקלט מספר עשרוני ומתייחסת אליו כאל תוים.אסור לי להשתמש בפונקציות ,מערכים או מחרוזות. אשמח לקבל רעיונות
int digit; char str[30];//or any other size you think that be right int i=0; while(n>0) { digit=n%10; str = digit+48; //assignment of the number to the string // and incrises by 48 - to convert the number into a "asci" code i++; //promotes the counter of the string n=n/10; }