Computer Science, asked by rajdeepsen6, 1 year ago

please do the Java code

Attachments:

Answers

Answered by nain31
9
import Java. io. *;
Class p
{
public static void main(String args[])throws Exception
{
int a, b, c, d;
DataInputStream in=new DataInputStream(System.in);
System.out.println("Enter the four numbers ");
a=Integer.parseInt(in.readLine());
b=Integer.parseInt(in.readLine());
c=Integer.parseInt(in.readLine());
d=Integer.parseInt(in.readLine());
if(a>b&&a>d&&a>c)
System.out.println(a+"is greater ");
if(b>a&&b>c&&b>d)
Sytem.out.println(b+"is greater ");
if(c>a&&c>b&&c>d)
Sytem.out.println(c+"is greater ");
if(d>a&&d>b&&d>c)
Sytem.out.println(d+"is greater ");
}
}

rajdeepsen6: hii
rajdeepsen6: nj
Similar questions