Computer Science, asked by kanupriya163, 7 months ago

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 abhay03ac
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