home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.comp.os.windows-10      Steaming pile of horseshit Windows 10      197,590 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 197,116 of 197,590   
   Paul to All   
   Re: stray ipv6 router????   
   05 Feb 26 10:06:33   
   
   From: nospam@needed.invalid   
      
   On Thu, 2/5/2026 4:19 AM, Daniel70 wrote:   
   > On 5/02/2026 12:01 am, Graham J wrote:   
   >> John wrote:   
   >>   
   >> [snip]   
   >   
   >> European alphabet-based languages were easier to learn.  The only   
   disadvantages was the Roman numbering system which was clearly a barrier to   
   numeracy   
   >>   
   > I thought Roman Numbering was rather simple. at least for the lessor numbers.   
      
   OK, write a program to convert decimal integers to Roman Numerals :-)   
      
   ************* From the CoPilot House Of Programming ********************   
      
   /* gcc -o roman.exe roman.c */   
      
   #include    
      
   void toRoman(int num, char *out) {   
       struct {   
           int value;   
           const char *symbol;   
       } map[] = {   
           {1000, "M"}, {900, "CM"}, {500, "D"}, {400, "CD"},   
           {100, "C"},  {90, "XC"},  {50, "L"},  {40, "XL"},   
           {10, "X"},   {9, "IX"},   {5, "V"},   {4, "IV"},   
           {1, "I"}   
       };   
      
       int i = 0;   
       out[0] = '\0';   
      
       while (num > 0) {   
           if (num >= map[i].value) {   
               num -= map[i].value;   
               strcat(out, map[i].symbol);   
           } else {   
               i++;   
           }   
       }   
   }   
      
   int main() {   
       int n;   
       char roman[32];   
      
       printf("Enter an integer: ");   
       scanf("%d", &n);   
      
       if (n < 1 || n > 9999) {   
           printf("Number out of range (1–9999)\n");   
           return 1;   
       }   
      
       toRoman(n, roman);   
       printf("The Roman numeral is: %s\n", roman);   
      
       return 0;   
   }   
   ************* From the CoPilot House Of Programming ********************   
      
   What is interesting about this particular run, was the glacial rate the   
   output tokens were generated. I would scroll a line, it would fill it,   
   I would scroll another line, it would fill it. Must be running on a PC.   
      
   Untested :-)   
      
   The AI assures me  9999 ==> "MMMMMMMMMCMXCIX"   
      
      Paul   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca