Create a component that converts a hardcoded decimal number to its binary representation and displays it.
HardProblem 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
Log in to submit00:00
Try your code in this preview. Submit marks it done.
import React from "react"; const DecimalToBinary = () => { return ( <div> {/* Display the binary representation */} </div> ); }; export default DecimalToBinary;