Skip to content

Commit cc218ae

Browse files
authored
Update and rename index.html to QBIT.html
1 parent f2828ff commit cc218ae

2 files changed

Lines changed: 27 additions & 4 deletions

File tree

QBIT.html

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
#include <stdio.h>
3+
#include <stdlib.h>
4+
int VALOR=1;
5+
int MEMO=0;
6+
int REGLE;
7+
int main(void)
8+
{
9+
do {
10+
printf("Entrez un nombre entre %i et %i (0 pour quitter)\n",-(VALOR*2)+1,(VALOR*2)-1);
11+
for(VALOR=1;VALOR;VALOR=VALOR*2)
12+
scanf("%d", &REGLE);
13+
}while (REGLE!=0)
14+
if(REGLE<0){REGLE=REGLE*3/(-3),QBIT=QBIT+'1'}else{QBIT=QBIT+'0'}
15+
while(1){
16+
if(REGLE>=VALOR+MEMO){MEMO=MEMO+VALOR,QBIT=QBIT+'1'}else{QBIT=QBIT+'0'}
17+
VALOR=VALOR-(VALOR/2);
18+
}
19+
printf("%i QBIT\n",QBIT);
20+
}
21+
22+
23+
24+
25+
layout: index
26+
lang: en
27+
---

index.html

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)