Computer Science, asked by harshyadav979aa, 1 year ago


w a p to input two numbers and print the cube of greater number in Java program in blue J

Answers

Answered by Anshi2005
1
Heya mate....❤❤
import java.util.*;
class Numbers
{
public static void main(String args[])
System.out.println("Enter two numbers");
int a=sc.nextInt();
int b=sc.nextInt();
if (a>b)
{
int c=a*a*a;
System.out.println("Cube of a"+c);
}
else
{
System.out.println("Cube of b"+c);
}
}
}
Hope it helps you my friend..
Please mark it as Brainliest...

harshyadav979aa: Thanks didi
Anshi2005: Welcome..
Similar questions