From 8377fed2445bdbb833a37aaaa5282c24f9fa50ff Mon Sep 17 00:00:00 2001 From: Augusto Date: Wed, 24 Apr 2019 17:19:59 +0100 Subject: [PATCH] parameters counter exam exercise readme --- subjects/paramcount.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 subjects/paramcount.md diff --git a/subjects/paramcount.md b/subjects/paramcount.md new file mode 100644 index 00000000..cc93c365 --- /dev/null +++ b/subjects/paramcount.md @@ -0,0 +1,21 @@ +## paramcount + +### Instructions + +Write a program that displays the number of arguments passed to it, followed by +a newline. + +If there are no arguments, just display a 0 followed by a newline. + +Example of output : + +```console +student@ubuntu:~/student/paramcount$ go build +student@ubuntu:~/student/paramcount$ ./paramcount 1 2 3 5 7 24 +6 +student@ubuntu:~/student/paramcount$ ./paramcount 6 12 24 | cat -e +3$ +student@ubuntu:~/student/paramcount$ ./paramcount | cat -e +0$ +student@ubuntu:~/student/paramcount$ +```