Computer Science, asked by sushilanjana63, 3 months ago

write a program in bluej for calculating cube of 10​

Answers

Answered by apranshusinha
2

Answer:

// Java Program to Find Cube of a Number

import java.util.Scanner;

public class CubeofNumber {

private static Scanner sc;

public static void main(String[] args)  

{

 int number, cube;

 sc = new Scanner(System.in);

 

 System.out.print(" Please Enter any Number : ");

 number = sc.nextInt();  

 

 cube = number * number * number;

 

 System.out.println("\n The Cube of a Given Number  " + number + "  =  " + cube);

}

}

Hope u like my answer pls mark me as brillent

Similar questions