Alle Zahlen von 0001 bis 9999?

...komplette Frage anzeigen

6 Antworten

Python:



all = ["%04d\\\\\\\\n"%(i+1) for i in range(999)]
str=""
for s in all:
str = str + s
print(st

Ergibt


0001\\\\n0002\\\\n0003\\\\n0004\\\\n0005\\\\n0006\\\\n0007\\\\n0008\\\\n0009\\\\n0010\\\\n0011\\\\n0012\\\\n0013\\\\n0014\\\\n0015\\\\n0016\\\\n0017\\\\n0018\\\\n0019\\\\n0020\\\\n0021\\\\n0022\\\\n0023\\\\n0024\\\\n0025\\\\n0026\\\\n0027\\\\n0028\\\\n0029\\\\n0030\\\\n0031\\\\n0032\\\\n0033\\\\n0034\\\\n0035\\\\n0036\\\\n0037\\\\n0038\\\\n0039\\\\n0040\\\\n0041\\\\n0042\\\\n0043\\\\n0044\\\\n0045\\\\n0046\\\\n0047\\\\n0048\\\\n0049\\\\n0050\\\\n0051\\\\n0052\\\\n0053\\\\n0054\\\\n0055\\\\n0056\\\\n0057\\\\n0058\\\\n0059\\\\n0060\\\\n0061\\\\n0062\\\\n0063\\\\n0064\\\\n0065\\\\n0066\\\\n0067\\\\n0068\\\\n0069\\\\n0070\\\\n0071\\\\n0072\\\\n0073\\\\n0074\\\\n0075\\\\n0076\\\\n0077\\\\n0078\\\\n0079\\\\n0080\\\\n0081\\\\n0082\\\\n0083\\\\n0084\\\\n0085\\\\n0086\\\\n0087\\\\n0088\\\\n0089\\\\n0090\\\\n0091\\\\n0092\\\\n0093\\\\n0094\\\\n0095\\\\n0096\\\\n0097\\\\n0098\\\\n0099\\\\n0100\\\\n0101\\\\n0102\\\\n0103\\\\n0104\\\\n0105\\\\n0106\\\\n0107\\\\n0108\\\\n0109\\\\n0110\\\\n0111\\\\n0112\\\\n0113\\\\n0114\\\\n0115\\\\n0116\\\\n0117\\\\n0118\\\\n0119\\\\n0120\\\\n0121\\\\n0122\\\\n0123\\\\n0124\\\\n0125\\\\n0126\\\\n0127\\\\n0128\\\\n0129\\\\n0130\\\\n0131\\\\n0132\\\\n0133\\\\n0134\\\\n0135\\\\n0136\\\\n0137\\\\n0138\\\\n0139\\\\n0140\\\\n0141\\\\n0142\\\\n0143\\\\n0144\\\\n0145\\\\n0146\\\\n0147\\\\n0148\\\\n0149\\\\n0150\\\\n0151\\\\n0152\\\\n0153\\\\n0154\\\\n0155\\\\n0156\\\\n0157\\\\n0158\\\\n0159\\\\n0160\\\\n0161\\\\n0162\\\\n0163\\\\n0164\\\\n0165\\\\n0166\\\\n0167\\\\n0168\\\\n0169\\\\n0170\\\\n0171\\\\n0172\\\\n0173\\\\n0174\\\\n0175\\\\n0176\\\\n0177\\\\n0178\\\\n0179\\\\n0180\\\\n0181\\\\n0182\\\\n0183\\\\n0184\\\\n0185\\\\n0186\\\\n0187\\\\n0188\\\\n0189\\\\n0190\\\\n0191\\\\n0192\\\\n0193\\\\n0194\\\\n0195\\\\n0196\\\\n0197\\\\n0198\\\\n0199\\\\n0200\\\\n0201\\\\n0202\\\\n0203\\\\n0204\\\\n0205\\\\n0206\\\\n0207\\\\n0208\\\\n0209\\\\n0210\\\\n0211\\\\n0212\\\\n0213\\\\n0214\\\\n0215\\\\n0216\\\\n0217\\\\n0218\\\\n0219\\\\n0220\\\\n0221\\\\n0222\\\\n0223\\\\n0224\\\\n0225\\\\n0226\\\\n0227\\\\n0228\\\\n0229\\\\n0230\\\\n0231\\\\n0232\\\\n0233\\\\n0234\\\\n0235\\\\n0236\\\\n0237\\\\n0238\\\\n0239\\\\n0240\\\\n0241\\\\n0242\\\\n0243\\\\n0244\\\\n0245\\\\n0246\\\\n0247\\\\n0248\\\\n0249\\\\n0250\\\\n0251\\\\n0252\\\\n0253\\\\n0254\\\\n0255\\\\n0256\\\\n0257\\\\n0258\\\\n0259\\\\n0260\\\\n0261\\\\n0262\\\\n0263\\\\n0264\\\\n0265\\\\n0266\\\\n0267\\\\n0268\\\\n0269\\\\n0270\\\\n0271\\\\n0272\\\\n0273\\\\n0274\\\\n0275\\\\n0276\\\\n0277\\\\n0278\\\\n0279\\\\n0280\\\\n0281\\\\n0282\\\\n0283\\\\n0284\\\\n0285\\\\n0286\\\\n0287\\\\n0288\\\\n0289\\\\n0290\\\\n0291\\\\n0292\\\\n0293\\\\n0294\\\\n0295\\\\n0296\\\\n0297\\\\n0298\\\\n0299\\\\n0300\\\\n0301\\\\n0302\\\\n0303\\\\n0304\\\\n0305\\\\n0306\\\\n0307\\\\n0308\\\\n0309\\\\n0310\\\\n0311\\\\n0312\\\\n0313\\\\n0314\\\\n0315\\\\n0316\\\\n0317\\\\n0318\\\\n0319\\\\n0320\\\\n0321\\\\n0322\\\\n0323\\\\n0324\\\\n0325\\\\n0326\\\\n0327\\\\n0328\\\\n0329\\\\n0330\\\\n0331\\\\n0332\\\\n0333\\\\n0334\\\\n0335\\\\n0336\\\\n0337\\\\n0338\\\\n0339\\\\n0340\\\\n0341\\\\n0342\\\\n0343\\\\n0344\\\\n0345\\\\n0346\\\\n0347\\\\n0348\\\\n0349\\\\n0350\\\\n0351\\\\n0352\\\\n0353\\\\n0354\\\\n0355\\\\n0356\\\\n0357\\\\n0358\\\\n0359\\\\n0360\\\\n0361\\\\n0362\\\\n0363\\\\n0364\\\\n0365\\\\n0366\\\\n0367\\\\n0368\\\\n0369\\\\n0370\\\\n0371\\\\n0372\\\\n0373\\\\n0374\\\\n0375\\\\n0376\\\\n0377\\\\n0378\\\\n0379\\\\n0380\\\\n0381\\\\n0382\\\\n0383\\\\n0384\\\\n0385\\\\n0386\\\\n0387\\\\n0388\\\\n0389\\\\n0390\\\\n0391\\\\n0392\\\\n0393\\\\n0394\\\\n0395\\\\n0396\\\\n0397\\\\n0398\\\\n0399\\\\n0400\\\\n0401\\\\n0402\\\\n0403\\\\n0404\\\\n0405\\\\n0406\\\\n0407\\\\n0408\\\\n0409\\\\n0410\\\\n0411\\\\n0412\\\\n0413\\\\n0414\\\\n0415\\\\n0416\\\\n0417\\\\n0418\\\\n0419\\\\n0420\\\\n0421\\\\n0422\\\\n0423\\\\n0424\\\\n0425\\\\n0426\\\\n0427\\\\n0428\\\\n0429\\\\n0430\\\\n0431\\\\n0432\\\\n0433\\\\n0434\\\\n0435\\\\n0436\\\\n0437\\\\n0438\\\\n0439\\\\n0440\\\\n0441\\\\n0442\\\\n0443\\\\n0444\\\\n0445\\\\n0446\\\\n0447\\\\n0448\\\\n0449\\\\n0450\\\\n0451\\\\n0452\\\\n0453\\\\n0454\\\\n0455\\\\n0456\\\\n0457\\\\n0458\\\\n0459\\\\n0460\\\\n0461\\\\n0462\\\\n0463\\\\n0464\\\\n0465\\\\n0466\\\\n0467\\\\n0468\\\\n0469\\\\n0470\\\\n0471\\\\n0472\\\\n0473\\\\n0474\\\\n0475\\\\n0476\\\\n0477\\\\n0478\\\\n0479\\\\n0480\\\\n0481\\\\n0482\\\\n0483\\\\n0484\\\\n0485\\\\n0486\\\\n0487\\\\n0488\\\\n0489\\\\n0490\\\\n0491\\\\n0492\\\\n0493\\\\n0494\\\\n0495\\\\n0496\\\\n0497\\\\n0498\\\\n0499\\\\n0500\\\\n0501\\\\n0502\\\\n0503\\\\n0504\\\\n0505\\\\n0506\\\\n0507\\\\n0508\\\\n0509\\\\n0510\\\\n0511\\\\n0512\\\\n0513\\\\n0514\\\\n0515\\\\n0516\\\\n0517\\\\n0518\\\\n0519\\\\n0520\\\\n0521\\\\n0522\\\\n0523\\\\n0524\\\\n0525\\\\n0526\\\\n0527\\\\n0528\\\\n0529\\\\n0530\\\\n0531\\\\n0532\\\\n0533\\\\n0534\\\\n0535\\\\n0536\\\\n0537\\\\n0538\\\\n0539\\\\n0540\\\\n0541\\\\n0542\\\\n0543\\\\n0544\\\\n0545\\\\n0546\\\\n0547\\\\n0548\\\\n0549\\\\n0550\\\\n0551\\\\n0552\\\\n0553\\\\n0554\\\\n0555\\\\n0556\\\\n0557\\\\n0558\\\\n0559\\\\n0560\\\\n0561\\\\n0562\\\\n0563\\\\n0564\\\\n0565\\\\n0566\\\\n0567\\\\n0568\\\\n0569\\\\n0570\\\\n0571\\\\n0572\\\\n0573\\\\n0574\\\\n0575\\\\n0576\\\\n0577\\\\n0578\\\\n0579\\\\n0580\\\\n0581\\\\n0582\\\\n0583\\\\n0584\\\\n0585\\\\n0586\\\\n0587\\\\n0588\\\\n0589\\\\n0590\\\\n0591\\\\n0592\\\\n0593\\\\n0594\\\\n0595\\\\n0596\\\\n0597\\\\n0598\\\\n0599\\\\n0600\\\\n0601\\\\n0602\\\\n0603\\\\n0604\\\\n0605\\\\n0606\\\\n0607\\\\n0608\\\\n0609\\\\n0610\\\\n0611\\\\n0612\\\\n0613\\\\n0614\\\\n0615\\\\n0616\\\\n0617\\\\n0618\\\\n0619\\\\n0620\\\\n0621\\\\n0622\\\\n0623\\\\n0624\\\\n0625\\\\n0626\\\\n0627\\\\n0628\\\\n0629\\\\n0630\\\\n0631\\\\n0632\\\\n0633\\\\n0634\\\\n0635\\\\n0636\\\\n0637\\\\n0638\\\\n0639\\\\n0640\\\\n0641\\\\n0642\\\\n0643\\\\n0644\\\\n0645\\\\n0646\\\\n0647\\\\n0648\\\\n0649\\\\n0650\\\\n0651\\\\n0652\\\\n0653\\\\n0654\\\\n0655\\\\n0656\\\\n0657\\\\n0658\\\\n0659\\\\n0660\\\\n0661\\\\n0662\\\\n0663\\\\n0664\\\\n0665\\\\n0666\\\\n0667\\\\n0668\\\\n0669\\\\n0670\\\\n0671\\\\n0672\\\\n0673\\\\n0674\\\\n0675\\\\n0676\\\\n0677\\\\n0678\\\\n0679\\\\n0680\\\\n0681\\\\n0682\\\\n0683\\\\n0684\\\\n0685\\\\n0686\\\\n0687\\\\n0688\\\\n0689\\\\n0690\\\\n0691\\\\n0692\\\\n0693\\\\n0694\\\\n0695\\\\n0696\\\\n0697\\\\n0698\\\\n0699\\\\n0700\\\\n0701\\\\n0702\\\\n0703\\\\n0704\\\\n0705\\\\n0706\\\\n0707\\\\n0708\\\\n0709\\\\n0710\\\\n0711\\\\n0712\\\\n0713\\\\n0714\\\\n0715\\\\n0716\\\\n0717\\\\n0718\\\\n0719\\\\n0720\\\\n0721\\\\n0722\\\\n0723\\\\n0724\\\\n0725\\\\n0726\\\\n0727\\\\n0728\\\\n0729\\\\n0730\\\\n0731\\\\n0732\\\\n0733\\\\n0734\\\\n0735\\\\n0736\\\\n0737\\\\n0738\\\\n0739\\\\n0740\\\\n0741\\\\n0742\\\\n0743\\\\n0744\\\\n0745\\\\n0746\\\\n0747\\\\n0748\\\\n0749\\\\n0750\\\\n0751\\\\n0752\\\\n0753\\\\n0754\\\\n0755\\\\n0756\\\\n0757\\\\n0758\\\\n0759\\\\n0760\\\\n0761\\\\n0762\\\\n0763\\\\n0764\\\\n0765\\\\n0766\\\\n0767\\\\n0768\\\\n0769\\\\n0770\\\\n0771\\\\n0772\\\\n0773\\\\n0774\\\\n0775\\\\n0776\\\\n0777\\\\n0778\\\\n0779\\\\n0780\\\\n0781\\\\n0782\\\\n0783\\\\n0784\\\\n0785\\\\n0786\\\\n0787\\\\n0788\\\\n0789\\\\n0790\\\\n0791\\\\n0792\\\\n0793\\\\n0794\\\\n0795\\\\n0796\\\\n0797\\\\n0798\\\\n0799\\\\n0800\\\\n0801\\\\n0802\\\\n0803\\\\n0804\\\\n0805\\\\n0806\\\\n0807\\\\n0808\\\\n0809\\\\n0810\\\\n0811\\\\n0812\\\\n0813\\\\n0814\\\\n0815\\\\n0816\\\\n0817\\\\n0818\\\\n0819\\\\n0820\\\\n0821\\\\n0822\\\\n0823\\\\n0824\\\\n0825\\\\n0826\\\\n0827\\\\n0828\\\\n0829\\\\n0830\\\\n0831\\\\n0832\\\\n0833\\\\n0834\\\\n0835\\\\n0836\\\\n0837\\\\n0838\\\\n0839\\\\n0840\\\\n0841\\\\n0842\\\\n0843\\\\n0844\\\\n0845\\\\n0846\\\\n0847\\\\n0848\\\\n0849\\\\n0850\\\\n0851\\\\n0852\\\\n0853\\\\n0854\\\\n0855\\\\n0856\\\\n0857\\\\n0858\\\\n0859\\\\n0860\\\\n0861\\\\n0862\\\\n0863\\\\n0864\\\\n0865\\\\n0866\\\\n0867\\\\n0868\\\\n0869\\\\n0870\\\\n0871\\\\n0872\\\\n0873\\\\n0874\\\\n0875\\\\n0876\\\\n0877\\\\n0878\\\\n0879\\\\n0880\\\\n0881\\\\n0882\\\\n0883\\\\n0884\\\\n0885\\\\n0886\\\\n0887\\\\n0888\\\\n0889\\\\n0890\\\\n0891\\\\n0892\\\\n0893\\\\n0894\\\\n0895\\\\n0896\\\\n0897\\\\n0898\\\\n0899\\\\n0900\\\\n0901\\\\n0902\\\\n0903\\\\n0904\\\\n0905\\\\n0906\\\\n0907\\\\n0908\\\\n0909\\\\n0910\\\\n0911\\\\n0912\\\\n0913\\\\n0914\\\\n0915\\\\n0916\\\\n0917\\\\n0918\\\\n0919\\\\n0920\\\\n0921\\\\n0922\\\\n0923\\\\n0924\\\\n0925\\\\n0926\\\\n0927\\\\n0928\\\\n0929\\\\n0930\\\\n0931\\\\n0932\\\\n0933\\\\n0934\\\\n0935\\\\n0936\\\\n0937\\\\n0938\\\\n0939\\\\n0940\\\\n0941\\\\n0942\\\\n0943\\\\n0944\\\\n0945\\\\n0946\\\\n0947\\\\n0948\\\\n0949\\\\n0950\\\\n0951\\\\n0952\\\\n0953\\\\n0954\\\\n0955\\\\n0956\\\\n0957\\\\n0958\\\\n0959\\\\n0960\\\\n0961\\\\n0962\\\\n0963\\\\n0964\\\\n0965\\\\n0966\\\\n0967\\\\n0968\\\\n0969\\\\n0970\\\\n0971\\\\n0972\\\\n0973\\\\n0974\\\\n0975\\\\n0976\\\\n0977\\\\n0978\\\\n0979\\\\n0980\\\\n0981\\\\n0982\\\\n0983\\\\n0984\\\\n0985\\\\n0986\\\\n0987\\\\n0988\\\\n0989\\\\n0990\\\\n0991\\\\n0992\\\\n0993\\\\n0994\\\\n0995\\\\n0996\\\\n0997\\\\n0998\\\\n0999\\\\n

LG

Wozu man das immer braucht - es ist abenteuerlich und völlig "zweckentfremdet"...mit Sicherheit die Falsche Lösung. Kein Mensch der Welt macht sowas, um ein IT Problem zu lösen.

Musst du halt anpassen auf 9999 statt 999

Antwort bewerten Vielen Dank für Deine Bewertung

Auf Papier? In eine Datei? In irgendein theoretisches Konstrukt?

Antwort bewerten Vielen Dank für Deine Bewertung

Stell mal die eigentliche Frage. 
Wenn du gerade die Zahlen von 1 bis 9999 als string (!!) hard coden (!!!!!!) willst, DANN LASS ES UM GOTTES WILLEN SEIN !!!!!!!!!!!!

!!!

Antwort bewerten Vielen Dank für Deine Bewertung
Hairgott 12.10.2017, 01:57

Why? Is doch möglich xD.

0
Neweage 12.10.2017, 02:03
@Hairgott

... das gibt Alpträume... böse Alpträume. Morgen nehme ich mir frei aufgrund Schlafmangels. :-P

1

mit basic dürfte das gehen. da gibts befehle wie print oder for next. aber schon lange nichts mehr damit gemacht. musste mal nach basic googlen.

lg, Anna

Antwort bewerten Vielen Dank für Deine Bewertung

Ich glaube mit einer Programmiersprache könntest du es schaffen

mit "print" und ein paar variablen könnte es funktionieren

Antwort bewerten Vielen Dank für Deine Bewertung
LukasStrutz 12.10.2017, 00:45

da hast du eigentlich sogar Recht, danke

0

Kann das nicht einfügen ist zu lang.    
    
Klick auf den Link, und dann auf ausführen oder so einen Pfeil. Dann bekommst du deine Daten:

https://repl.it/M44k/0

Antwort bewerten Vielen Dank für Deine Bewertung
Hairgott 12.10.2017, 06:15

Haha xD bald kommt noch wer mit Brainfuck (diese Lustige Sprache) Wenn nicht schau ich mir das selbst mal an :D

0

Was möchtest Du wissen?