Create a component that checks if a hardcoded number is a prime number and displays the result.
HardProblem Statement
Create a component that checks if a hardcoded number is a prime number and displays the result.
Sample Input
29
Sample Output
Is Prime: true
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 PrimeCheck = () => { return ( <div> {/* Display whether the number is prime */} </div> ); }; export default PrimeCheck;