Petit prog d'incrémentation
Fermé
Fred0ne
Messages postés
13
Date d'inscription
mercredi 3 novembre 2010
Statut
Membre
Dernière intervention
23 juin 2015
-
Modifié par pijaku le 20/12/2013 à 10:00
MrYAU31 Messages postés 3808 Date d'inscription samedi 23 février 2013 Statut Membre Dernière intervention 8 juillet 2017 - 20 déc. 2013 à 09:36
MrYAU31 Messages postés 3808 Date d'inscription samedi 23 février 2013 Statut Membre Dernière intervention 8 juillet 2017 - 20 déc. 2013 à 09:36
A voir également:
- Petit prog d'incrémentation
- Petit 3 ✓ - Forum Word
- Trier du plus petit au plus grand excel - Guide
- Petit 9 - Forum Mail
- Petit 2 ✓ - Forum MacOS
- Petit 2 ✓ - Forum Bureautique
1 réponse
MrYAU31
Messages postés
3808
Date d'inscription
samedi 23 février 2013
Statut
Membre
Dernière intervention
8 juillet 2017
1 615
Modifié par MrYAU31 le 20/12/2013 à 09:42
Modifié par MrYAU31 le 20/12/2013 à 09:42
Bonjour,
Est-ce que ceci te conviendrait ?
Est-ce que ceci te conviendrait ?
cls
@echo off
SETLOCAL EnableDelayedExpansion
set n=0
:toto
SET CNombreDec=%n%
SET BIN_RETURN=
FOR %%B IN (32768,16384,8192,4096,2048,1024,512,256,128,64,32,16,8, 4, 2, 1) DO (
SET /a Cbit=!CNombreDec!/%%B
SET /a CNombreDec=!CnombreDec!%%%%B
SET BIN_RETURN=!BIN_RETURN!!Cbit!
)
echo %BIN_RETURN%
set /A n=%n%+1
goto toto