60 lines
834 B
C++
60 lines
834 B
C++
// Prog10
|
||
//
|
||
// Programadores:
|
||
//
|
||
// Juan L¢pez Fern ndez
|
||
// Mois‚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¢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);
|
||
|
||
}
|
||
|
||
|
||
|
||
|