Programming Exercises

Create a component that converts a hardcoded decimal number to its binary representation and displays it.

Hard

Problem Statement

Create a component that converts a hardcoded decimal number to its binary representation and displays it.

Sample Input

Decimal: 25

Sample Output

Binary Representation: 11001

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
import React from "react"; const DecimalToBinary = () => { return ( <div> {/* Display the binary representation */} </div> ); }; export default DecimalToBinary;
Log in or sign up to run or submit your code.Log inSign up
Input
Decimal: 25
Expected Output
Binary Representation: 11001