Skip to content

Commit dff7ee1

Browse files
committed
update extendedGcdInt
1 parent 8ae5f9a commit dff7ee1

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/mainExtendedGcdInt.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* @brief Main for Extended Euclidean algorithm for integers
44
*/
55
#include <stdio.h>
6+
#include "integer.h"
67
#include "extendedGcdInt.h"
78

89
/**
@@ -11,9 +12,15 @@
1112
int main()
1213
{
1314
int a, b, u, v;
15+
1416
printf("== Extended Euclidean algorithm for integers ==\n");
15-
printf("a = "); scanf("%d", &a);
16-
printf("b = "); scanf("%d", &b);
17+
18+
/* Init integers */
19+
i_scan(&a, "a");
20+
i_scan(&b, "b");
21+
22+
/* Extended Euclidean algorithm */
1723
print_extended_gcd_int(a, b, &u, &v);
24+
1825
return 0;
1926
}

0 commit comments

Comments
 (0)