write a program in Java to assign an integer value 33 and fractional value 12.5. print the cube of integer and square of fractional value
Answers
Answered by
19
int a=33;
double d=12.5;
System.out.println(a*a*a);
System.out.println(d*d);
double d=12.5;
System.out.println(a*a*a);
System.out.println(d*d);
Answered by
10
import java. io. *;
public class cube
{
BufferedReader in=new BufferedReader(new InputStreamReader(System. in) )
{
int c;
double b;
System.out.println("The cube of 33 is"+ (c*c*c) );
System.out.println("Square is"+(Math. pow(12.5,2) );
}
}
public class cube
{
BufferedReader in=new BufferedReader(new InputStreamReader(System. in) )
{
int c;
double b;
System.out.println("The cube of 33 is"+ (c*c*c) );
System.out.println("Square is"+(Math. pow(12.5,2) );
}
}
Similar questions