Wednesday, December 9, 2020

Bigger Between Two Numbers in Java

 Write a program that will ask the user to give two numbers and then the program will check and determine which of the two numbers has a bigger numerical value. If the two numbers have an equal numerical value it will display a message they have the same value.

 I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod City I also accepting computer repair, networking, and Arduino Project development at a very affordable price. My website is www.jakerpomperada.blogspot.com and www.jakerpomperada.com

If you like this video please click the LIKE button, SHARE, and SUBSCRIBE to my channel.

Your support on my channel is highly appreciated.

Thank you very much.






Program Listing


/**
Machine Problem in Java

Write a program that will ask the user to give two numbers
and then the program will check and determine which of the
two numbers has a bigger numerical value. If the two numbers
has an equal numerical value it will display a message they 
have the same value.


 @author Jake Rodriguez Pomperada,MAED-IT, MIT
 www.jakerpomperada.com / www.jakerpomperada.blogspot.com
 jakerpomperada@gmail.com
 Bacolod City, Negros Occidental Philippines
 December 8, 2020   Tuesday
*/

import java.util.Scanner;

public class Bigger_Between_Two_Numbers {

public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner input = new Scanner(System.in);
        
        System.out.println("\n");
        System.out.print("\tBigger Between Two Numbers in Java");
        System.out.println("\n");
        System.out.print("\tGive First Value  : ");
        int first = input.nextInt();
        System.out.print("\tGive Second Value : ");
        int second = input.nextInt();
        
        System.out.println();
        if (first > second) {
        System.out.print("\tThe number " + first 
        + " has the bigger value than " + second + ".");
        } else if (second > first) {
        System.out.print("\tThe number " + second 
        + " has the bigger value than " + first + ".");
        } else {
        System.out.print("\tBoth number " + first 
    + " and " + second + " has the same numerical value.");
    } 
        
        input.close();
        System.out.println("\n");
        System.out.println("\tEnd of Program");
        System.out.println("\n");


}

}


No comments:

Post a Comment