Write a java program to display the following patterns. INPUT_1:Enter any number: 5 OUTPUT:5 4 3 2 1 5 4 3 2 5 4 3…
Write a java program to compare two strings lexicographically. Lexicographical order is nothing but the dictionary order or preferably the order in which words appear…
Write a java program to find Pair of Integers in Array whose Sum is Given Number. The Number of Inputs are as follows:The first line…
Mana is out on a hike with friends. She finds a trail of stones with numbers on them. She starts following the trail and notices…
Get array as input and display the sum of array elements as outputs. S = sum(A) returns the sum of the elements of A along…
If the user pressed number keys( from 0 to 9), the program will tell the number that is pressed, otherwise, program will show “”Not allowed”.…
Write a program to accept a n X n matrix and print addition of diagonal elements of that matrix. INPUT_1:Enter the size of matrix nxn…
Write a java program to display the following patterns. INPUT_1:Enter a number: 5 OUTPUT:************************* INPUT_2:Enter a number: 4 OUTPUT:**************** INPUT_3:Enter a number: 6 OUTPUT:************************************ INPUT_4:Enter…
Write a java program to display the following patterns. INPUT_1:Enter a number: 4 OUTPUT:4 3 2 1 4 3 2 4 3 4 INPUT_2:Enter a…
Declare a protected static variable outside the main and increment the variable inside a function which is called inside the main and the incremented value…
The International Mobile Equipment Identity (IMEI) number is a unique identification or serial number that all mobile phones and smartphones have. It is normally 15…
Java program to convert from decimal to octal. INPUT_1:Enter the Decimal Number: 123 OUTPUT:Octal Number is: 173 INPUT_2:Enter the Decimal Number: 25 OUTPUT:Octal Number is: …
Given a number (n) , the task is to find if its divisible by 11 or not. Input:The first line of input contains an integer…
Write a program to print reverse of a number of the given number. INPUT_1:Enter a number: 1234 OUTPUT:Reversed No: 4321 INPUT_2:Enter a number: 7859 OUTPUT:Reversed…
Write a Java program to declare integer variables, float variable, get input from user and Then display their values on the output INPUT_1:Enter any numbers:…
Java program to check number for prime or not. If the number is Prime print “yes” else print “no” INPUT_1:Enter the Number: 25 OUTPUT:NO INPUT_2:Enter…
Java Program to convert from binary to decimal number INPUT_1:Enter a Binary Number: 1101 OUTPUT:Decimal Number: 13 INPUT_2:Enter a Binary Number: 111 OUTPUT:Decimal Number: 7…
Java Program to Swap two numbers by using division and multiplication. INPUT_1:Enter any two numbers: 3 2 OUTPUT:2 3 INPUT_2:Enter any two numbers: 20 45…
Many people think about their height in feet and inches, even in some countries that primarily use the metric system. Write a program that reads…
Write a java program to print concatenated strings . You can + operator to concatenate strings and print it. INPUT_1:Enter the Strings: I am Fine…