3 like 0 dislike
195 views
Write a program that reads an integer in [0,255] continuously and displays it in binary. For example, if the user enters 32, the program should display 00100000. For any value out of [0,255], display "Invalid number"

Sample Input 1:

256

Sample Output 1:

Invaid number

Sample Input 2:

10

Sample Output 2:

00001010
[Normal] Coding (C) - asked in Introduction to Computer Programming I (C) by (20.9k points)
ID: 21873 - Available when: Unlimited - Due to: Unlimited
| 195 views
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:172.69.58.121
©2016-2024

Related questions

3 like 0 dislike
0 answers
[Normal] Coding (C) - asked Feb 6, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
ID: 21867 - Available when: Unlimited - Due to: Unlimited
| 234 views
6 like 0 dislike
1 answer
[Normal] Coding (C) - asked Oct 16, 2017 in Introduction to Computer Programming I (C) by thopd (12.1k points)
ID: 27170 - Available when: Unlimited - Due to: Unlimited
| 327 views
3 like 0 dislike
0 answers
[Normal] Coding (C) - asked Jan 25, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
ID: 21795 - Available when: Unlimited - Due to: Unlimited
| 233 views
3 like 0 dislike
0 answers
[Normal] Essay (Open question) - asked Feb 12, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
ID: 21926 - Available when: Unlimited - Due to: Unlimited
| 229 views
3 like 0 dislike
0 answers
[Normal] Essay (Open question) - asked Feb 12, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
ID: 21923 - Available when: Unlimited - Due to: Unlimited
| 226 views
12,783 questions
183,443 answers
172,219 comments
4,824 users