Practice Real Company Assessment Patterns • Latest 2025–2026 Mock Tests

Programming Exercises

Create a component that checks if a hardcoded number is a prime number and displays the result.

Hard

Problem 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

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;