Backup proyecto Joyfe - Borland
This commit is contained in:
59
CPP/PRUEBA.CPP
Normal file
59
CPP/PRUEBA.CPP
Normal file
@ -0,0 +1,59 @@
|
||||
// Prog10
|
||||
//
|
||||
// Programadores:
|
||||
//
|
||||
// Juan L<>pez Fern<72>ndez
|
||||
// Mois<69>s Virumbrales Cuenca
|
||||
// DAI 1<>A
|
||||
//
|
||||
// Program que introducido un n<>mero decimal, lo cambia a la base
|
||||
// introducida.
|
||||
|
||||
#include<stdio.h>
|
||||
#include<conio.h>
|
||||
|
||||
#define A 10
|
||||
#define B 11
|
||||
#define C 12
|
||||
#define D 13
|
||||
#define E 14
|
||||
#define F 15
|
||||
#define a 10
|
||||
#define b 11
|
||||
#define c 12
|
||||
#define d 13
|
||||
#define e 14
|
||||
#define f 15
|
||||
|
||||
int tabla[15];
|
||||
void leer_datos ();
|
||||
|
||||
void main () {
|
||||
leer_datos;
|
||||
//verificar
|
||||
//pasar_base10
|
||||
//pasar_base_elegida
|
||||
//mostrar_resultados
|
||||
fflush(stdin);
|
||||
getch();
|
||||
}
|
||||
|
||||
// Funci<63>n de leer datos.
|
||||
void leer_datos () {
|
||||
|
||||
int num,con=0;
|
||||
do {
|
||||
fflush(stdin);
|
||||
cscanf("%1d",&num);
|
||||
if (num>=0 && num <=15) {
|
||||
tabla[con]=num;
|
||||
con++;
|
||||
}
|
||||
}
|
||||
while (num<=0 && num >=15 && con >15);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user