How to create java program to bubble sort the values in ascending order
How to create java program to bubble sort the values in ascending order. Today we will discuss how to print values …
How to create java program to bubble sort the values in ascending order. Today we will discuss how to print values …
Write a java program to compute net pay after deducting tax of 15% from the gross pay. Write a program to …
import java.util.*;class Nums_Sum{public static void main(){Scanner in=new Scanner(System.in);double n=0,sp=0,sn=0;do{System.out.println(“Enter number “);n=in.nextDouble();if(n>0)sp=sp+n;if(n<0)sn=sn+n;if(n==0)System.out.println(“0 input terminating.”);}while(n!=0);System.out.println(“Sum of positive number “+sp);System.out.println(“Sum of negative number “+sn);}} …
import java.util.Scanner;class Special_Number{public static void main(){Scanner sc = new Scanner (System.in);System.out.println(“Enter any no.”);int n = sc.nextInt ();int f = 0;int r;while …
import java.util.*;class factorial{public static void fact(int n){int i=0,f=1;for(i=1;i<=n;++i)f=f*i;System.out.println(f);}public static void main(){Scanner in=new Scanner(System.in);System.out.println(“Enter a number to find its factorial”);int inp=in.nextInt();fact(inp);}} In …
import java.util.Scanner;class AutomorphBuzz{public static void main(){Scanner kb=new Scanner(System.in); System.out.println(“Enter a number to check whether a number is an Automorphic or a …
how to print reverse of number in java For Example number is 5786 Reverse is 6875 Firstly We Will Take a …
Today We will create a java program to take input of number and check weather it is a prime number or …
Today We Will learn to find the area of a triangle using java we know that area of triangle is half*base*height …
Hello Friends Today I will Show You How We Can Print 1 3 6 10 15 21 28 sequence using for …