11 Sample programmes
Write a program to calculate the factorial of a number using a recursive function.
Implement a PHP script to find the largest element in an array.
Create a program that converts a string to uppercase without using built-in functions.
Write a PHP script to check if a given number is prime.
Implement a program to reverse a string without using built-in functions.
Create a PHP script that generates a random password of a specified length.
Write a program to calculate the sum of digits in a given number.
Implement a script that finds the second-largest element in an array.
Create a program to check if a given string is a palindrome.
Write a PHP script to sort an array in ascending order.
Implement a program to calculate the Fibonacci series up to a given number of terms.
Create a PHP script that validates an email address.
Write a program to find the average of numbers in an array.
Implement a script to count the occurrences of each character in a string.
Create a PHP program to check if a given year is a leap year.
Write a program to find the greatest common divisor (GCD) of two numbers.
Implement a script that reverses the order of words in a sentence.
Create a PHP program to calculate the sum of all even numbers between two given numbers.
Write a program to check if a given string contains a specific substring.
Implement a script that removes duplicate elements from an array.
Create a PHP program to convert a decimal number to binary.
Write a program to find the length of the longest word in a sentence.
Implement a script to check if two strings are anagrams.
Create a PHP program to find the square root of a given number.
Write a program to calculate the power of a number using a recursive function.
Implement a script that removes all whitespace characters from a string.
Create a PHP program to reverse the order of elements in an array.
Write a program to check if a given number is Armstrong.
Implement a script that counts the number of vowels and consonants in a string.
Create a PHP program to find the LCM of two numbers.
Write a program to sort an associative array by its values.
Implement a script that checks if a string is a valid palindrome ignoring spaces and punctuation.
Create a PHP program to generate all possible combinations of a given set of elements.
Write a program to find the sum of all prime numbers in a given range.
Implement a script that calculates the factorial of a number using an iterative approach.
Create a PHP program to check if a given string is an anagram of a palindrome.
Write a program to reverse the order of elements in an associative array.
Implement a script to remove duplicate characters from a string.
Create a PHP program to check if a given number is a perfect number.
Write a program to count the number of words in a sentence.
Implement a script that converts a string to title case.
Create a PHP program to find the median of an array of numbers.
Write a program to check if a given string is a valid IP address.
Implement a script that finds the common elements between two arrays.
Create a PHP program to generate the nth Fibonacci number.
Write a program to find the first non-repeated character in a string.
Implement a script that finds the missing number in a given array of consecutive numbers.
Create a PHP program to check if a given number is a strong number.
Write a program to count the number of occurrences of a word in a sentence.
Implement a script that converts a number to its Roman numeral equivalent.
0 comments:
Post a Comment