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.

23 lines
645 B

6 years ago
## printbits
6 years ago
### Instructions
Write a program that takes a number as argument, and prints it in binary value **without a newline at the end**.
5 years ago
- If the the argument is not a number the program should print `00000000`.
### Expected output :
```console
student@ubuntu:~/printbits$ go build
student@ubuntu:~/printbits$ ./printbits 1
00000001student@ubuntu:~/printbits$
student@ubuntu:~/printbits$ ./printbits 192
11000000student@ubuntu:~/printbits$
student@ubuntu:~/printbits$ ./printbits a
00000000student@ubuntu:~/printbits$
student@ubuntu:~/printbits$ ./printbits 1 1
student@ubuntu:~/printbits$ ./printbits
student@ubuntu:~/printbits$
5 years ago
```