write a class to input two integers andJava program for class 9
write a class to input two integer and print cube of second number
hint- use math function- math.sqrt
warning- don't spam otherwise will be reported and your answer will be deleted
Answers
Answered by
0
Answer:
import java.util.Scanner;
class MathisFun
{
Scanner sc=new Scanner(System.in);
static int a,b;
public void main(Sting args[])
{
System.out.println("enter your first number ");
a=sc.nextInt();
System.out.println("enter your second number ");
b=sc.nextInt();
System.out.println(Math.pow(b,3));
}
}
Explanation:
If you have any problem in this program feel free to ask me
Similar questions
Math,
3 months ago
Math,
3 months ago
Social Sciences,
7 months ago
Science,
7 months ago
English,
1 year ago
Political Science,
1 year ago