69.7k views
2 votes
Write a program that prompts the user to enter a decimal number between 0 and 15 and displays its corresponding binary value. Here are sample runs: Enter a decimal number between 0 and 15: 11 The binary number for 11 is 1011

User Rowhawn
by
6.5k points

1 Answer

4 votes

Answer:

Attached is the program and the output

Step-by-step explanation:

A program that prompts the user to enter a decimal number between 0 and 15 and displays its corresponding binary value and output

Write a program that prompts the user to enter a decimal number between 0 and 15 and-example-1
Write a program that prompts the user to enter a decimal number between 0 and 15 and-example-2
User Giulio Bambini
by
7.0k points