What do you want to save?
Add Code snippet
New code examples
-
Java 2021-09-11 04:45:02
Java program to print multiplication table of any number
import java.util.Scanner; public class MultiplicationTablesInJava { public static void main(String[] args) { System.out.println("Please enter an integer to print tables : "); Scanner sc = new Scanner(System.in); int numbe... Add solution -
Java 2021-09-10 02:52:03
Print pattern in java 1 01 101 0101 10101
// Print pattern in java 1 01 101 0101 10101 import java.util.Scanner; public class PatternInJava { public static void main(String[] args) { int a, b, x, y; Scanner sc = new Scanner(System.in); System.out.println("Please enter... Add solution -
Java 2021-09-08 04:56:03
sum of digits java
long number, sum; Scanner sc = new Scanner(System.in); System.out.println("Enter any DIGIT number: "); number = sc.nextLong(); sc.close(); // For Logic for adding all digits in the given number for (sum = 0; number != 0; number /= 10) { sum += ... Add solution -
Java 2021-09-07 15:07:03
Reverse factorial program in java
// Reverse factorial program in java import java.util.Scanner; public class ReverseFactorialProgram { public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.println("Please enter a number to compute... Add solution -
Java 2021-09-03 20:49:01
sum in range
//Java program to print the sum of numbers in a given rangeimport java.util.Scanner;public class sum_of_numbers_in_range{ public static void main(String[] args) { //scanner class declaration Scanner sc = new Scanner(System.in); //input from user Syst... Add solution -
Java 2021-09-02 10:22:02
Java program to swap two numbers using function
import java.util.Scanner; // java swap function public class SwapTwoNumberDemo { int numOne, numTwo; public void swapNum(SwapTwoNumberDemo stn) { int temp; temp = stn.numOne; stn.numOne = stn.numTwo; stn.numTwo = temp; ... Add solution -
Java 2021-08-31 16:37:01
area of equilateral triangle java
import java.util.Scanner; public class AreaOfEquilateral { public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.println("Please enter the side of equilateral triangle: "); double side =... Add solution -
Java 2021-08-31 04:38:02
4 digit armstrong number in java
// Check whether a given number is armstrong number or not import java.util.Scanner; public class ArmstrongNumber { public static void main(String[] args) { int x, y, z = 0, temp; Scanner sc = new Scanner(System.in); System.out.pri... Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5