Français
Source/ Codesnippets

Integer Roman Römische Les chiffres - 2

 

Andreas
Miethe


Integer dans römische Les chiffres konvertieren.
KompilierenMarqueSéparation
'##############################################
'# Autor           : ampsoft (Andreas Miethe) #
'# Thema           : Integer zu Römisch       #
'# XProfan-Version : 11                       #
'##############################################

Proc IntToRoman

    PARAMETERS Decimals&
    Var result$ = ""
    Declare Romans$[]
    Declare Arabics$[]
    Var Romans$ = "I,IV,V,IX,X,XL,L,XC,C,CD,D,CM,M"
    Var Arabics$ = "1,4,5,9,10,40,50,90,100,400,500,900,1000"
    Romans$[] = Explode(Romans$, ",")
    Arabics$[] = Explode(Arabics$, ",")

    whileloop 12,0,-1

        While Decimals& >= Int(Arabics$[&loop])

            Decimals& = Decimals& - Int(Arabics$[&loop])
            Result$ = Result$ + Romans$[&loop]

        EndWhile

    EndWhile

    Return Result$

EndProc

CLS
Print IntToRoman(2013)
WaitInput
Fin
 
XProfan X2
Gruss
Andreas
________ ________ ________ ________ _
Profan 3.3 - XProfanX2
Win 95,98,ME,2000,XP,Vista - Win 7 32 / 64 Bit
ASUS X93S - Intel Core I7-NVIDIA GForce 540M 8GB Arbeitsspeicher
Homepage :  [...] 
01.06.2013  
 




Julian
Schmidt
Irre je mich ou bien gibt es pas aussi cela ↁ comme 5000, ou bien quelquefois aussi A geschrieben.

qui spinnen, qui Römer!
 
XProfan X2
Win7 Professional, SP1, AMD FX(tm)-8350 Eight-Core Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
01.06.2013  
 




Andreas
Miethe


Julian Schmidt (01.06.13)

Irre je mich ou bien gibt es pas aussi cela ? comme 5000, ou bien quelquefois aussi A geschrieben.

qui spinnen, qui Römer!


déjà richtig, et ↂ pour 10000.
Du darfst cela volontiers erweitern
 
XProfan X2
Gruss
Andreas
________ ________ ________ ________ _
Profan 3.3 - XProfanX2
Win 95,98,ME,2000,XP,Vista - Win 7 32 / 64 Bit
ASUS X93S - Intel Core I7-NVIDIA GForce 540M 8GB Arbeitsspeicher
Homepage :  [...] 
01.06.2013  
 




Julian
Schmidt
Okay, so.
KompilierenMarqueSéparation
'##############################################
'# Autor           : ampsoft (Andreas Miethe) #
'# Thema           : Integer zu Römisch       #
'# XProfan-Version : 11                       #
'##############################################

Proc IntToRoman

    PARAMETERS Decimals&
    Declare Romans$[], Arabics$[], result$
    Var Romans$ = "I,IV,V,IX,X,XL,L,XC,C,CD,D,CM,M,MA,A,B"
    Var Arabics$ = "1,4,5,9,10,40,50,90,100,400,500,900,1000,4000,5000,10000"
    Romans$[] = Explode(Romans$, ",")
    Arabics$[] = Explode(Arabics$, ",")

    whileloop Len(Romans$,",")-1,0,-1

        While Decimals& >= Int(Arabics$[&loop])

            Decimals& = Decimals& - Int(Arabics$[&loop])
            Result$ = Result$ + Romans$[&loop]

        EndWhile

    EndWhile

    Return Result$

EndProc

CLS
Print IntToRoman(2013)
Print IntToRoman(4508)
Print IntToRoman(5108)
Print IntToRoman(10301)
WaitInput
Fin
 
XProfan X2
Win7 Professional, SP1, AMD FX(tm)-8350 Eight-Core Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
01.06.2013  
 



Zum Quelltext


Topictitle, max. 100 marque.
 

Systemprofile:

ne...aucune Systemprofil angelegt. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

s'il te plaît s'inscrire um une Beitrag trop verfassen.
 

Options du sujet

9.395 Views

Untitledvor 0 min.
p.specht20.11.2021
Uwe Lang20.11.2021
Manfred Barei19.11.2021
Wilfried Friebe17.11.2021
plus...

Themeninformationen

cet Thema hat 2 participant:

Julian Schmidt (2x)
Andreas Miethe (2x)


Admins  |  AGB  |  Applications  |  Auteurs  |  Chat  |  protection des données  |  Télécharger  |  Entrance  |  Aider  |  Merchantportal  |  Empreinte  |  Mart  |  Interfaces  |  SDK  |  Services  |  Jeux  |  cherche  |  Support

un projet aller XProfaner, qui il y a!


Mon XProfan
Privé Nouvelles
Eigenes Ablageforum
Sujets-La liste de voeux
Eigene Posts
Eigene Sujets
Zwischenablage
Annuler
 Deutsch English Français Español Italia
Traductions

protection des données


Wir verwenden Cookies seulement comme Session-Cookies à cause de qui technischen Notwendigkeit et chez uns gibt es aucun Cookies de Drittanbietern.

si du ici sur unsere Webseite klickst ou bien navigierst, stimmst du unserer Erfassung de Informationen dans unseren Cookies sur XProfan.Net trop.

Weitere Informationen trop unseren Cookies et en supplément, comment du qui Kontrolle par-dessus behältst, findest du dans unserer nachfolgenden Datenschutzerklärung.


d'accordDatenschutzerklärung
je voudrais keinen Cookie