Skip to content

Category Archives: Java Programs

Given a number n, find whether all digits of n divide it or not. Examples: Input : 128 Output : Yes 128 % 1 ==… Read More
Given diameter and height, find the perimeter of a cylinder. Perimeter is the length of the outline of a two – dimensional shape. A cylinder… Read More
Given multiple numbers and a number n, the task is to print the remainder after multiply all the number divide by n. Examples: Input :… Read More
Focal length is the distance between the center of the mirror to the principal foci. In order to determine the focal length of a spherical… Read More
Given a number n, the task is to find the odd factor sum. Examples: Input : n = 30 Output : 24 Odd dividers sum… Read More
Write a Java program to count the characters in each word in a given sentence? Examples: Input : geeks for geeks Output : geeks->5 for->3… Read More
Write a Java Program to Swap first and last character of words in a Sentence as mentioned in the example? Examples: Input : geeks for… Read More
In this program we will see how we can take screenshots using a java program and save the screenshot in desired folder. We use java.awt.Robot… Read More
The standard normal distribution is a special case of the normal distribution. It occurs when a normal random variable has a mean of 0 and… Read More
A Tetrahedron is simply a pyramid with a triangular base. It is a solid object with four triangular faces, three on the sides or lateral… Read More
Write a Java program which prints number of occurrences of each characters and also it should not print repeatedly occurrences of duplicate characters as given… Read More
Write a Java program to convert the first character uppercase in a sentence and if apart from the first character if any other character is… Read More
write a program where each column represents same number according to given example: Examples : Input : 5 Output : 1 212 32123 212 1… Read More
Given a positive integer \’n\'( 1 = 1;      }        // n must be odd at this point,     // thus skip the even numbers      //… Read More
Given a character, we need to print its ASCII value in C/C++/Java/Python. Examples : Input : a Output : 97 Input : D Output :… Read More