Está en la página 1de 4

DECIMAL

0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

BINARIO
0
1
10
11
100
101
110
111
1000
1001
1010
1011
1100
1101
1110
1111
100000
100001
100010
100011
100100
100101
100110
100111
101000
101001

OCTAL
0
1
2
3
4
5
6
7
10
11
12
13
14
15
16
17
20
21
22
23
24
25
26
27
30
31

HEXADECIMAL
0
1
2
3
4
5
6
7
8
9
A 10
B11
C12
D13
E14
F 15
16
17
18
19
20
21
22
23
24
25

Problema 2
#include<stdio.h>
#include<conio.h>
Int opc;
Printf(usuario);
Gets (usuario);
Leer(opc)
If (opc ==1)
Totfrijol = comprar frijol();
if(totfrijol > 0)
frijol = frijol totfrijol;
}
Int comprar frijol(){
Int f;
Printf(cuantos kilos de frijol quieres?);
Scanf(%d, &f);
If(e>f);
Printf(compra exitosa);
Return f;
}else{
Printf(articulo agotado);
Return -1;
}
If(opc ==2){
Tottortilla = comprar tortilla (tortilla)
If(tottortilla > 0)

Tortilla = tortilla tortilla;


}If(opc ==3){
}if(opc==4){
Imprimir tortilla,tortilla,Kg precio: 3.55
frijol,frijol,Kg precio: 8.75
cafe,cafe,Frascos precio: 14.25
If(opc==6){
Tot = 0;
If(tot tortilla > 0)
Tot + = tottortilla * 3.55;
Printf(tortilla: %d, total:%f\n, tottortilla, tottortilla * 3.55);
}if(totfrijol>0){
Tot + = totfrijol * 8.75;
Printf(frijol: %d, total:%f \n, totfrijol, totfrijol * 8.75);
}if(totcafe>0){
Tot + = totcafe * 14.25;
Printf(cafe: %d, total:%f \n, totcafe, totcafe * 14.25);
}
Printf(pago: %f, tot);
}//facture
}while (opc! = 0);
//main
{if(opc==7)}
Printf(nombre); gets (usuario);
Tortillas = totcafe=totfrijol=0;
}

También podría gustarte