19 lines
292 B
C
19 lines
292 B
C
|
#include <stdio.h>
|
||
|
#include "gm.h"
|
||
|
void main()
|
||
|
{
|
||
|
DEC da, *a=&da, db, *b=&db;
|
||
|
DEC *f;
|
||
|
char s[30];
|
||
|
|
||
|
do {
|
||
|
printf("Type a number: ");
|
||
|
scanf("%s",s);
|
||
|
f = ConvAsciiToDecimal(a,s);
|
||
|
} while (f == GM_NULL);
|
||
|
|
||
|
CopyDecimal(b,a);
|
||
|
ConvDecimalToAscii(s,b);
|
||
|
printf("You typed a %s\n",s);
|
||
|
}
|