18 lines
		
	
	
		
			336 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			336 B
		
	
	
	
		
			C
		
	
	
	
	
	
| #include <stdio.h>
 | |
| #include <stdlib.h>
 | |
| #include <math.h>
 | |
| 
 | |
| int main(int argc, char *argv[]) {
 | |
|     long int x, y;
 | |
|     ldiv_t result;
 | |
| 
 | |
|     sscanf(argv[1], "%ld", &x);
 | |
|     sscanf(argv[2], "%ld", &y);
 | |
| 
 | |
|     result = ldiv(x, y);
 | |
|     printf("quotient : %ld\n", result.quot);
 | |
|     printf("reste : %ld\n", result.rem);
 | |
| 
 | |
|     return EXIT_SUCCESS;
 | |
| }
 |