Browse Source

formatting

pull/75/head
Christopher Fremond 5 years ago committed by Frenchris
parent
commit
9922fcb463
  1. 11
      subjects/gcd.md

11
subjects/gcd.md

@ -1,15 +1,16 @@
# gcd ## gcd
## Instructions
### Instructions
Write a program that takes two strings representing two strictly positive Write a program that takes two strings representing two strictly positive
integers that fit in an int. integers that fit in an int.
Display their greatest common divisor followed by a newline (It's always a Display their greatest common divisor followed by a newline (It is always a
strictly positive integer). strictly positive integer).
If the number of parameters is not 2, display a newline. If the number of parameters is not 2, display a newline.
## Expected output Example of output :
```console ```console
student@ubuntu:~/student/gcd$ go build student@ubuntu:~/student/gcd$ go build
@ -19,7 +20,7 @@ student@ubuntu:~/student/gcd$ ./gcd 42 12 | cat -e
6$ 6$
student@ubuntu:~/student/gcd$ ./gcd 14 77 | cat -e student@ubuntu:~/student/gcd$ ./gcd 14 77 | cat -e
7$ 7$
student@ubuntu:~/student/gcd$ ./gcd 17 3 | cat -e student@ubuntu:~/student/gcd$ ./gcd 17 3 | cat -e
1$ 1$
student@ubuntu:~/student/gcd$ ./gcd | cat -e student@ubuntu:~/student/gcd$ ./gcd | cat -e
$ $

Loading…
Cancel
Save