## PATTERNS – L5 (Numbers pattern) in Java

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…

## Compare two strings lexicographically in Java

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…

## Sum of array pairs equals given number in Java …FTC

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 and trail of Stones ….Java FTC

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…

## Sum of Array elements in Java [With Ilustrat..] …FTC

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…

## Write a Java program to detect key presses …FTC

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”.…

## Sum of diagonal of a matrix in Java …FTC

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…

## Asterisk (*) pattern in Java …FTC

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…

## Number Pattern in Java …FTC

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…

## Declaring Variable outside main [Java]

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…

## Java program to check for IMEI number …FTC

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…

## Decimal to Octal in Java …FTC

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: …

## Number divisible by 11 or not!! [Java] ..FTC

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…

## Reverse the given number [Java] …FTC

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…

## Get Input from User and Display [Java] Int and Float Values …FTC

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 number prime or not …FTC

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…

## Conversion from binary to decimal in Java …FTC

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…

## Swapping two numbers by multiplication and division in Java

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…

## Height – Foot and inches to Centimetres in Java …fcukthecode.com

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…

## Concatenate Strings in Java …fcukthecode.com

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…