Posts

Showing posts from August, 2021

SUM OF NATURAL NUMBERS

 ************************************************************************  W.A.P TO FIND SUM OF NATURAL NUMBERS ************************************************************************   JAVA Program           Online compiler Output: ************************************************************************  C Program Online Compiler     ************************************************************************  C++ Program Online Compiler ************************************************************************  C# Program   Online Compiler   Output: ************************************************************************  PHP Program Online Compiler Php is a server side scripting language. ************************************************************************  JAVASCRIPT Program <!DOCTYPE html> <html><head><meta charset="utf-8"><title></title> <script...

FACTORS OF A NUMBER

 ************************************************************************  W.A.P TO FIND THE FACTORS OF A NUMBER ************************************************************************   JAVA Program           Online compiler Output: ************************************************************************  C Program Online Compiler     ************************************************************************  C++ Program Online Compiler ************************************************************************  C# Program   Online Compiler   Output: ************************************************************************  PHP Program Online Compiler Php is a server side scripting language. ************************************************************************  JAVASCRIPT Program <!DOCTYPE html> <html><head><meta charset="utf-8"><title></title> <scrip...

ARMSTRONG NUMBER

 ************************************************************************  W.A.P TO CHECK ARMSTRONG NUMBER ************************************************************************   JAVA Program           Online compiler Output: ************************************************************************  C Program Online Compiler     ************************************************************************  C++ Program Online Compiler ************************************************************************  C# Program   Online Compiler   Output: ************************************************************************  PHP Program Online Compiler Php is a server side scripting language. ************************************************************************  JAVASCRIPT Program <!DOCTYPE html> <html><head><meta charset="utf-8"><title></title> <script type...

CALCULATOR USING SWITCH

 ************************************************************************  W.A.P TO MAKE A CALCULATOR USING SWITCH CASE ************************************************************************   JAVA Program           Online compiler Output: ************************************************************************  C Program Online Compiler     ************************************************************************  C++ Program Online Compiler ************************************************************************  C# Program   Online Compiler   Output: ************************************************************************  PHP Program Online Compiler Php is a server side scripting language. ************************************************************************  JAVASCRIPT Program <!DOCTYPE html> <html><head><meta charset="utf-8"><title></title> ...

FACTORIAL OF A NUMBER

 ************************************************************************  W.A.P TO FIND FACTORIAL OF A NUMBER ************************************************************************   JAVA Program           Online compiler Output: ************************************************************************  C Program Online Compiler     ************************************************************************  C++ Program Online Compiler ************************************************************************  C# Program   Online Compiler   Output: ************************************************************************  PHP Program Online Compiler Php is a server side scripting language. ************************************************************************  JAVASCRIPT Program <!DOCTYPE html> <html><head><meta charset="utf-8"><title></title> <script ...

FIND LARGEST NUMBER

************************************************************************  W.A.P TO FIND LARGEST NUMBER AMONG THREE NUMBERS ************************************************************************   JAVA Program           Online compiler Output: ************************************************************************  C Program Online Compiler     ************************************************************************  C++ Program Online Compiler ************************************************************************  C# Program   Online Compiler   Output: ************************************************************************  PHP Program Online Compiler Php is a server side scripting language. ************************************************************************  JAVASCRIPT Program <!DOCTYPE html> <html><head><meta charset="utf-8"><title></title> <...

GENERATE RANDOM NUMBER

  ************************************************************************  W.A.P TO GENERATE A RANDOM NUMBER ************************************************************************   JAVA Program           Online compiler Output: ************************************************************************  C Program Online Compiler     ************************************************************************  C++ Program Online Compiler ************************************************************************  C# Program   Online Compiler   Output: ************************************************************************  PHP Program Online Compiler Php is a server side scripting language. ************************************************************************  JAVASCRIPT Program <script type="text/javascript"> // Math.random() returns a random floating point number 0 to 1 // Math.rando...

NUMBER SIGN CHECK

************************************************************************  W.A.P TO CHECK NUMBER IS POSITIVE, NEGATIVE OR ZERO ************************************************************************   JAVA Program           Online compiler Output: ************************************************************************  C Program Online Compiler     ************************************************************************  C++ Program Online Compiler ************************************************************************  C# Program   Online Compiler   Output: ************************************************************************  PHP Program Online Compiler Php is a server side scripting language. ************************************************************************  JAVASCRIPT Program <!DOCTYPE html> <html><head><meta charset="utf-8"><title></title> ...

CELSIUS TO FAHRENHEIT

************************************************************************  W.A.P TO CONVERT CELSIUS TO FAHRENHEIT ************************************************************************   JAVA Program           Online compiler Output: ************************************************************************  C Program Online Compiler     ************************************************************************  C++ Program Online Compiler ************************************************************************  C# Program   Online Compiler   Output: ************************************************************************  PHP Program Online Compiler Php is a server side scripting language. ************************************************************************  JAVASCRIPT Program <!DOCTYPE html> <html><head><meta charset="utf-8"><title></title> <script typ...

KILOMETERS TO MILES

************************************************************************  W.A.P TO CONVERT KILOMETERS TO MILES ************************************************************************   JAVA Program           Online compiler Output: ************************************************************************  C Program Online Compiler     ************************************************************************  C++ Program Online Compiler ************************************************************************  C# Program   Online Compiler   Output: ************************************************************************  PHP Program Online Compiler Php is a server side scripting language. ************************************************************************  JAVASCRIPT Program <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> <script ty...

AREA OF A TRIANGLE

   ************************************************************************  W.A.P TO FIND AREA OF A TRIANGLE ************************************************************************   JAVA Program           Online compiler Output: ************************************************************************  C Program Online Compiler     ************************************************************************  C++ Program Online Compiler ************************************************************************  C# Program   Online Compiler   Output: ************************************************************************  PHP Program Online Compiler Php is a server side scripting language. ************************************************************************  JAVASCRIPT Program  <script type="text/javascript"> // L\ General formula: (base*height)/2 var base = prompt("Enter B...

SQUARE ROOT OF A NUMBER

 ************************************************************************  W.A.P TO FIND A SQUARE ROOT OF A NUMBER ************************************************************************   JAVA Program           Online compiler Output: ************************************************************************  C Program Online Compiler     ************************************************************************  C++ Program Online Compiler ************************************************************************  C# Program   Online Compiler   Output: ************************************************************************  PHP Program Online Compiler Php is a server side scripting language. ************************************************************************  JAVASCRIPT Program  <script type="text/javascript"> var a = prompt("Enter a number: "); console.log(Math.sqrt(a)); ...

SORT WORDS IN ALPHABETICAL ORDER

  ************************************************************************  W.A.P TO SORT WORDS IN ALPHABETICAL ORDER ************************************************************************   JAVA Program           Online compiler Output: ************************************************************************  C Program Online Compiler     ************************************************************************  C++ Program Online Compiler ************************************************************************  C# Program   Online Compiler   Output: ************************************************************************  PHP Program Online Compiler Php is a server side scripting language. ************************************************************************  JAVASCRIPT Program  <script type="text/javascript"> var string = prompt("Enter a string: "); var stringArray = str...

REPLACE CHARACTERS OF A STRING

 ************************************************************************  W.A.P TO REPLACE CHARACTERS OF A STRING ************************************************************************   JAVA Program           Online compiler Output: ************************************************************************  C Program Online Compiler     ************************************************************************  C++ Program Online Compiler ************************************************************************  C# Program   Online Compiler   Output: ************************************************************************  PHP Program Online Compiler Php is a server side scripting language. ************************************************************************  JAVASCRIPT Program  <script type="text/javascript"> // var string = prompt("Enter a string: "); var string = "Mr. Red...

FIRST LETTER OF A STRING IN TO UPPERCASE

   ************************************************************************  W.A.P TO CONVERT THE FIRST LETTER OF A STRING IN TO UPPERCASE ************************************************************************   JAVA Program           Online compiler Output: ************************************************************************  C Program Online Compiler     ************************************************************************  C++ Program Online Compiler ************************************************************************  C# Program   Online Compiler   Output: ************************************************************************  PHP Program Online Compiler Php is a server side scripting language. ************************************************************************  JAVASCRIPT Program  <script type="text/javascript"> var string = prompt("Enter a string:...

NUMBER OF OCCURRENCES OF A CHARACTER IN A STRING

 ************************************************************************  W.A.P TO CHECK THE NUMBER OF OCCURRENCES OF A CHARACTER IN A STRING ************************************************************************   REGEX MEANS REGULAR EXPRESSION JAVA Program           Online compiler Output: ************************************************************************  C Program Online Compiler     ************************************************************************  C++ Program Online Compiler ************************************************************************  C# Program   Online Compiler   Output: ************************************************************************  PHP Program Online Compiler Php is a server side scripting language. ************************************************************************  JAVASCRIPT Program  <script type="text/javascript"> var st...

COUNT THE NUMBER OF VOWELS IN A STRING USING REGEX

************************************************************************  W.A.P TO COUNT THE NUMBER OF VOWELS IN A STRING USING REGEX ************************************************************************   REGEX MEANS REGULAR EXPRESSION JAVA Program           Online compiler Output: ************************************************************************  C Program Online Compiler     ************************************************************************  C++ Program Online Compiler ************************************************************************  C# Program   Online Compiler   Output: ************************************************************************  PHP Program Online Compiler Php is a server side scripting language. ************************************************************************  JAVASCRIPT Program  <script type="text/javascript"> var string = prompt(...

STRING STARTS AND ENDS WITH CERTAIN CHARACTERS

  ************************************************************************  W.A.P TO CHECK WEATHER A STRING STARTS AND ENDS WITH CERTAIN CHARACTERS ************************************************************************  JAVA Program           Online compiler Output: ************************************************************************  C Program Online Compiler     ************************************************************************  C++ Program Online Compiler ************************************************************************  C# Program   Online Compiler   Output: ************************************************************************  PHP Program Online Compiler Php is a server side scripting language. ************************************************************************  JAVASCRIPT Program  <script type="text/javascript"> var string = prompt("Please enter a st...

STRING CONTAINS A SUBSTRING

  ************************************************************************  W.A.P TO CHECK WEATHER A STRING CONTAINS A SUBSTRING OR NOT ************************************************************************  JAVA Program           Online compiler Output: ************************************************************************  C Program Online Compiler     ************************************************************************  C++ Program Online Compiler ************************************************************************  C# Program   Online Compiler   Output: ************************************************************************  PHP Program Online Compiler Php is a serverside scripting language. ************************************************************************  JAVASCRIPT Program  <script type="text/javascript"> var string = prompt("Please enter a string: "); var...

PALINDROME STRING

    ************************************************************************  W.A.P TO CHECK GIVEN STRING IS PALINDROME STRING OR NOT ************************************************************************  JAVA Program           Online compiler Output: ************************************************************************  C Program Online Compiler     ************************************************************************  C++ Program Online Compiler ************************************************************************  C# Program   Online Compiler   Output: ************************************************************************  PHP Program Online Compiler Php is a serverside scripting language. ************************************************************************  JAVASCRIPT Program  <script type="text/javascript"> var string = prompt("Please enter a string: "); ...

PRIME NUMBER

    ************************************************************************  W.A.P TO GENERATE A LIST OF PRIME NUMBERS ************************************************************************  JAVA Program import java.util.Scanner; class Prime{     Scanner sc= new Scanner(System.in);     public void p1ton()     {         int i=0;         int num=0;         System.out.println("\nEnter upper limit: ");         int ul=sc.nextInt();         String primeNumbers ="";         for( i=1; i<=ul; i++){             int counter=0;             for (num=i; num>=1; num--){             if(i%num...

PALINDROME NUMBER

  ************************************************************************  W.A.P TO CHECK GIVEN NUMBER IS PALINDROME NUMBER OR NOT ************************************************************************  JAVA Program import java.util.Scanner; class demo {     public static void main(String[] args) {         Scanner sc=new Scanner(System.in);         System.out.println("Enter the Number: " );         int n= sc.nextInt();         // System.out.println("\nEntered number is: "+n);         int temp=0,x;         int n2= n;         while (n>0){             x=n%10;             n=n/10;     ...