Home » » Conditional operator in Java Program

Conditional operator in Java Program

Conditional operator in Java Program

Conditional operator in Java Program

Conditional operator

import java.io.*;
class arun
{
public Static void main(String args[]) throws IOException
{
DataInputStream in = new DataInputStream(System.in);
{
int a,b,c;
System.out.println("Enter the value of a and b is:");
a=Integer.parseInt(in.readLine());
b=Integer.parseInt(in.readLine());
c=a>b?a:b;
System.out.println("The value of c is:"+c);
}
}

0 coment�rios:

Post a Comment

Link you don't want to vouch for Read more: https://html.com/seo/#ixzz5zVltiZ5g