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
		
			
				
	
	
		
			27 lines
		
	
	
		
			467 B
		
	
	
	
		
			C
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			467 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;
 | |
| 	char	str[30];
 | |
| 	
 | |
| 	ZeroDecimal(a);
 | |
| 	ZeroDecimal(b);
 | |
| 	ZeroDecimal(c);
 | |
| 	
 | |
| 	printf(" First number:  ");
 | |
| 	scanf("%s", str);
 | |
| 	ConvAsciiToDecimal(a,str);
 | |
| 	
 | |
| 	printf("Second number:  ");
 | |
| 	scanf("%s", str);
 | |
| 	ConvAsciiToDecimal(b,str);
 | |
| 	
 | |
| 	MultiplyDecimalAndRound(c, a, b, 2);
 | |
| 
 | |
| 	ConvDecimalToAscii(str,c);
 | |
| 	printf("The product rounded to 2 decimal places is %s\n",str);
 | |
| }
 |