23 lines
365 B
C
23 lines
365 B
C
|
#include <stdio.h>
|
||
|
#include "gm.h"
|
||
|
void main(void);
|
||
|
|
||
|
void main()
|
||
|
{
|
||
|
DEC da, *a=&da, db, *b=&db, dc, *c=&dc;
|
||
|
|
||
|
ZeroDecimal(a);
|
||
|
ZeroDecimal(b);
|
||
|
ZeroDecimal(c);
|
||
|
|
||
|
printf(" First number: ");
|
||
|
dscanf("%t", a);
|
||
|
|
||
|
printf("Second number: ");
|
||
|
dscanf("%t", b);
|
||
|
|
||
|
MultiplyDecimalAndRound(c, a, b, 2);
|
||
|
|
||
|
dprintf("The product rounded to 2 decimal places is %t\n",c);
|
||
|
}
|