mirror of https://github.com/01-edu/public.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
531 B
22 lines
531 B
6 years ago
|
## paramcount
|
||
|
|
||
|
### Instructions
|
||
|
|
||
6 years ago
|
Write a program that displays the number of arguments passed to it. This number will be followed by
|
||
6 years ago
|
a newline.
|
||
|
|
||
|
If there are no arguments, just display a 0 followed by a newline.
|
||
|
|
||
6 years ago
|
Examples of outputs :
|
||
6 years ago
|
|
||
|
```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$
|
||
|
```
|