write a program to enter name and height of two persons and find shorter one among them(qbasic
Answers
Answered by
0
Explanation:
import Java.util.*;
class Persons
{
public static void main ( )
{
Scanner obj = new Scanner(System.in);
string n; int a, b;
System.out.println("Enter height of 1st person");
a=obj.nextInt( ); b=obj.nextInt( );
if (a>b)
{System.out.println(a+="Height of first person is greater than second")}
else (a<b)
{System.out.println(b+="Height of second person is greater than first person");
}
}
Hope the above answer helps you and don't forget to mark me brainliest and do follow me.......
Similar questions