w a p to input two numbers and print the cube of greater number in Java program in blue J
Answers
Answered by
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...
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
Similar questions