SEARCH

Your heart knows things your mind can't explain.

-------------------------------------------------------------



Your heart knows 


things your mind 

can't explain.




-------------------------------------------------------------

How to Retrieve forgotten Wifi password




                 

If you liked our tutorials, consider buying us a drink ??


“Help us support our site by Donating a small amount of donation"

You can donate by clicking the donate button below.


Basic java with output: The sum of all number is = and the product of all number is equals to




Basic java with output:  The sum of all number is =  and the product of all number is  equals to  



import java.util.Scanner;
public class sum_product
{

    public static void main (String[]args)
    {
        int s,o,u,l;
                                                                              System.out.println ("Enter First Number: ");
                                                                              Scanner rheyna = new Scanner (System.in);
                                                                           
                                                                              s = rheyna.nextInt ();
                                                                           
                                                                               System.out.println ("Enter Second Number: ");
                                                                              Scanner pallega = new Scanner (System.in);
                                                                           
                                                                              o = pallega.nextInt ();
     
                                                                              u= s+o;
                                                                              l= s*o;
                                                                         
                                                                           
                                                                         
                                                                          System.out.println ("The sum of all number is = "+u) ;
                                                                          System.out.println ("The product of all number is = "+l ) ;
                                                                       
                                                                       
                                                                     
                                                                       
                                                                       
}

}



OUTPUT


Enter First Number:  ( example:  5 )

Enter Second Number: ( example: 8 )

The sum of all number is = 13
The product of all number is = 40





HAVE FUN CODING!



“Help us support our site by Donating a small amount of donation"

You can donate by clicking the donate button below.


Basic java with output : Your Profile







Basic java with output  :  Your Profile





import java.util.*;
public class profile extends sum_product
{
static Scanner soul = new Scanner (System.in);
public static void main ( String[]args )
{    
String a;
int b;
double c;
System.out.println ( "What is your name : " );
a=soul.nextLine();
System.out.println ( "How old are you :" );
b=soul.nextInt();
System.out.println ( "height :" );
c=soul.nextDouble ();

System.out.println ("your name is " +a);
System.out.println ("your age is "+b);
System.out.println ("your height is " +c );
}
}






OUTPUT

What is your name : ? ( example: Pussy )

How old are you : ?  ( example: 1 )

height :  ?  ( example:  3 )

your name is Pussy
your age is 1

your height is 3.0
















HAVE FUN CODING!



“Help us support our site by Donating a small amount of donation"

You can donate by clicking the donate button below.


Basic java with output : The sum of all numbers in array is equals to



Basic java  with output  :   The sum of all numbers in array is equals to






import java.util.*;
public class ian
{
     static Scanner key = new Scanner (System.in);
     public static void main (String [] args)
     {
         System.out.print("Enter the size of Array : ");
         int a=key.nextInt();
         int [] var=new int [a];
         int sum = 0;
       
         for (int c=0;c<a;c++)
         {
             System.out.print("Enter "+(c+1));
             System.out.print(" number : ");
             var [c]=key.nextInt();
           
       }
         for( int num : var )
         {
          sum = sum+num;
      }
      System.out.println("The sum of all numbers is:"+sum);

   }
}





OUTPUT

Enter the size of Array :  ? (for example :  5 )
Enter 1 number :  ?  ( for example  2  ) 
Enter 2 number :  ?  ( for example  2  )
Enter 3 number :  ?  ( for example  1  )
Enter 4 number :  ?  ( for example  3  )
Enter 5 number :  ?  ( for example  5  )
The sum of all numbers is:   13









HAVE FUN CODING!



“Help us support our site by Donating a small amount of donation"

You can donate by clicking the donate button below.


Basic Java with output : HELLO WORLD



Basic Java with output :  HELLO WORLD




import java.util.*;
public class hello_world
{
public static void main ( String[]args )
{    
    System.out.print ("HELLO WORLD");
}
}







OUTPUT

HELLO WORLD





















HAVE FUN CODING!



“Help us support our site by Donating a small amount of donation"

You can donate by clicking the donate button below.