- Google Pixel topik
- Yettel topik
- Xiaomi 17 - még mindig tart
- Apple Watch
- iPhone topik
- Mobil flották
- Itt a Galaxy S26 széria: az Ultra fejlődött, a másik kettő alig
- Motorola Edge 50 Neo - az egyensúly gyengesége
- Motorola Moto G06 Power – nagyfater új zakót vett
- Samsung Galaxy Watch5 Pro - kerek, de nem tekerek
Új hozzászólás Aktív témák
-
mm00
aktív tag
Egy másik, ez függvénybe

// written by Ste Cork, free for any and all use.
//
const char *Number_AsRomanString( int iNumber )
{
struct RomanDigit_t
{
char *m_psString;
int m_iValue;
};
static const RomanDigit_t RomanDigits[]=
{
{"M", 1000},
{"CM", 900},
{"D", 500},
{"CD", 400},
{"C", 100},
{"XC", 90},
{"L", 50},
{"XL", 40},
{"X", 10},
{"IX", 9},
{"V", 5},
{"IV", 4},
{"I", 1},
};
// Strictly speaking, Roman digits can't display something
// such as 4999 without using overlaid bars and so forth,
// but for now this is a quick-and-dirty piece of code that'll
// just keep using M's...
//
static char sRomanString[20];
sRomanString[0] = '\0';
for (int i=0; iNumber && i<sizeof(RomanDigits)/
sizeof(RomanDigits[0]); i++)
{
while ( RomanDigits[i].m_iValue <= iNumber )
{
strcat( sRomanString, RomanDigits[i].m_psString );
iNumber -= RomanDigits[i].m_iValue;
}
}
return sRomanString;
}
Új hozzászólás Aktív témák
● olvasd el a téma összefoglalót!
● ha kódot szúrsz be, használd a PROGRAMKÓD formázási funkciót!
- 27% - LG UltraFine 27UQ850V-W 4K IPS Monitor! 3840x2160 / 60Hz / FreeSync
- AZONNAL KÉSZLETRŐL! Intel Core i5 14600K 32GB 6000MHz RAM 2TB Gen4 SSD RTX 5060 8GB FSP 750W
- Apple iPhone 17 Pro 256GB Bontatlan Független Összes Szín / 27% áfás ár INGYENES SZÁLLÍTÁS
- AKCIÓ! ASRock A520M R5 3600 16GB DDR4 512GB SSD GTX 1060 6GB ZALMAN T3 Plus Deepcool 400W
- Xiaomi Redmi Note 14 Pro 256GB,Újszerű,Dobozaval,12 hónap garanciával
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest



