Home Java Scanner class

Scanner class

10 min read
0
0
56

Scanner class in java which is assume to input the data and read the data.

Example  1

Input the name using Scanner

Example 2

Input Two Numbers and Calculate the display the Total using Scanner

Example 3

Input the employee Salary and calculate the notes and coins

5000 notes
1000 notes :
500 notes :
100 notes :
50 notes :
20 notes :
10 coins :
5 coins :
2 coins :
1 coins :

How to get the output look like below.

Enter your First name : John

Enter your Last name : Peter

Enter your Home number : 89

Enter your Road name : main

Enter your city : Japan

Your Full Name : John Peter

Your Home Address : No: 89, main Rd, Japan.

IF Else Condition

when we make a decisions of the programming  that time we can use if condition.
If the condition is true we use IF.if the condition is false use Else

Input the Num1,Num2 and calculate the maximum value

Input the Number 1,Number 2,Number 3 and calculate the maximum value.

Input the Student Marks 1,Marks 2,Marks 3 calculate and display the total,average,Grade.

In order to calculate the Grade include the following condition.
if the average greater than 50 result will be “Pass” Other wise result will “Fail”

Input the Student Marks 1,Marks 2,Marks 3 calculate and display the total,average,Grade.

In order to calculate the Grade include the following condition.
if the average greater than 75 Grade will be “A”
if the average greater than 65 Grade will be “B”
if the average greater than 55 Grade will be “C”
if the average greater than 35 Grade will be “S”
Other wise Fail

 

 

 

 

    Load More Related Articles
    Load More By admin
    Load More In Java

    Leave a Reply

    Your email address will not be published.

    Check Also

    Node js React Mongodb Search Functionality

    In this articles will teach how to search records Node js React Express Mongodb.how the se…