Computer Science, asked by ina11, 7 months ago

plz solve this ptogram only with if statement.....write a java program to input two numbers and find the square of the greatest number.. plzzzzzzz solve ASAP.....plzzzzzzzz​

Answers

Answered by venkatavineela3
1

Answer:

Explanation:

import java.util.*

public static void main(String args{[])

{

Scanner sc;

int a,b,c;

a=sc.nextInt(System.in);

b=sc.nextInt(System.in);

if(a>b)

  c=a*a;

else

  c=b*b;

System.out.println("square of largest number is"+c);

}

Similar questions