What do you want to save?
Add Code snippet
New code examples
-
Java 2022-01-22 07:51:29
Multiplication table for number Java
int i,k; Scanner sc = new Scanner(System.in); System.out.println("Enter the Number for the table: "); int n = sc.nextInt(); for (i=1;i<=10;i++){ k = n * i; //n + "*" + c + " = " + (n*c)) System.ou... Add solution -
Java 2021-11-21 21:17:16
Java program to find perimeter of a rectangle
import java.util.Scanner; public class PerimeterOfRectangleDemo { public static void main(String []args) { float length, width, perimeter; Scanner sc = new Scanner(System.in); System.out.print("Please enter length of recta... Add solution -
Java 2021-11-20 03:31:10
tcp checksum calculation java code
// Java code for Checksum_Sender package checksum_sender; import java.io.*; import java.net.*; import java.util.*; public class Checksum_Sender { // Setting maximum data length &n... Add solution -
Java 2021-11-10 19:24:14
Java program to print Floyd's triangle
import java.util.Scanner; public class PrintFloydsTriangle { public static void main(String[] args) { int row, y, z, number = 1; Scanner sc = new Scanner(System.in); System.out.println("Enter the number of rows of floyd's tria... Add solution -
Java 2021-11-09 06:39:15
Java program to find largest in three numbers using ternary operator
// Java program to find smallest of three numbers using ternary operator import java.util.Scanner; public class SmallestOfThreeNumbers { public static void main(String[] args) { int number1, number2, number3, smallest, temp; Scanner sc... Add solution -
Java 2021-11-08 22:35:12
Java program to calculate cubic capacity cc in bikes
import java.util.Scanner;public class Main{public static void main(String[] args){Scanner sc = new Scanner(System.in);int cc = sc.nextInt();if(100>cc){System.out.println("Enter the large number");}if(100<=cc && 125>=cc){System.o... Add solution -
Java 2021-11-08 21:05:14
Reverse a string in java without using reverse function
// Reverse a string in java without using reverse function import java.util.Scanner; public class ReverseWithoutFunction { public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.println("Please en... Add solution -
Java 2021-11-08 14:32:12
how to input in java
Scanner sc = new Scanner(System.in); // Create a Scanner object String userName = sc.nextLine();//read input string int age = sc.nextInt(); //read input integer long mobileNo = sc.nextLong(); //read input long double cgpa = sc.nextDouble(); //read input ... Add solution