PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
CREATE TABLE user_value (`user_name` varchar(4), `user_pass` varchar(3)) ;
Copy Clear
Copy Format Clear
<?php // Enable error reporting for debugging error_reporting(E_ALL); ini_set('display_errors', 1); // Function to find the greater number function findGreater($num1, $num2) { if ($num1 > $num2) { return "The greater number is: $num1"; } elseif ($num2 > $num1) { return "The greater number is: $num2"; } else { return "Both numbers are equal."; } } // Running the function with example inputs for online compilers $num1 = intval(readline("Enter first number: ")); $num2 = intval(readline("Enter second number: ")); // Output the result echo findGreater($num1, $num2) . "\n";
Show:  
Copy Clear