Write a component that calculates the GCD (Greatest Common Divisor) of two hardcoded numbers and displays it.
HardProblem Statement
Write a component that calculates the GCD (Greatest Common Divisor) of two hardcoded numbers and displays it.
Sample Input
Numbers: 56 and 98
Sample Output
GCD: 14
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 CalculateGCD = () => { return ( <div> {/* Display the GCD */} </div> ); }; export default CalculateGCD;