Files correlati : Ricompilazione Demo : [ ] Commento : Aggiunti i sorgenti per Greenleaf Math Library (gfm.dll) git-svn-id: svn://10.65.10.50/trunk@10079 c028cbd2-c16b-5b4b-a496-9718f37d4682
23 lines
365 B
C
Executable File
23 lines
365 B
C
Executable File
#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);
|
|
}
|