Prime Number or not using PHP
<?php if ($_SERVER[ "REQUEST_METHOD "] == "POST ") { $num = $_POST[ "num "]; $is_prime = true; if ($num <= 1) { $is_prime = false; } else { for ($i …
Prime Number or not using PHP Read More<?php if ($_SERVER[ "REQUEST_METHOD "] == "POST ") { $num = $_POST[ "num "]; $is_prime = true; if ($num <= 1) { $is_prime = false; } else { for ($i …
Prime Number or not using PHP Read More<?php if ($_SERVER["REQUEST_METHOD"] == "POST") { $num = $_POST["num"]; // convert number to string $num_str = strval($num); // reverse the string $reverse_str = strrev($num_str); // check if the original number …
Palindrome or not using PHP Read More<?php $sum = 6 + 7; echo "The sum of 6 and 7 is: " , $sum; ?>
Add two numbers 6 and 7 using PHP Read More<!DOCTYPE html> <html> <head> <title>Even or odd checker</title> </head> <body> <form method="post"> <label for="number">Enter a number:</label> <input type="text" id="number" name="number"><br><br> <input type="submit" name="submit" value="Check"> </form> <?php if (isset($_POST['submit'])) { $num …
Even or Odd using PHP Read More<html> <head> <title>Find the greatest number</title> </head> <body> <form method="post" > <label for="number1">Enter the first number:</label> <input type="number" id="number1" name="number1"><br><br> <label for="number2">Enter the second number:</label> <input type="number" id="number2" name="number2"><br><br> <input …
Greatest among any two numbers using PHP Read More<html> <body> <form method="POST"> Number 1:<br> <input name="num1"><br> Number 2:<br> <input name="num2"><br> <input type="submit" name="submit"> </form> <?php if(isset($_POST['submit'])) { $a=$_POST['num1']; $b=$_POST['num2']; $c=$a+$b; echo "Sum : ",$c; } ?> </body> </html>
Add any two numbers using PHP Read More<html> <body> <h1> Count vowel</h1> <script> let str = " hello, world!"; let vowelCount = 0; // convert string to lowercase to handle both uppercase and lowercase vowels str = …
count vowel in JavaScript Read More<html> <body> <script> function clickevent() { alert("HELLO WORLD"); } </script> <input type="button" onclick="clickevent()" value="CLICK HERE"> </body> </html> <html> <head> </head> <body> <script > function mouseover() { alert("Wake Up"); …
Events in JavaScript Read More<html> <body> <script> for (var i = 1; i <= 10; i++) { document.write(i + "<br>"); } </script> </body> </html>
Display 1 to 10 in JavaScript Read More<html> <head> <script> function calculate() { var base = document.getElementById("base").value; var exponent = document.getElementById("exponent").value; var result = Math.pow(base, exponent); document.getElementById("output").innerHTML = "The result is " + result; } </script> </head> …
finding power in JavaScript Read More