Computer Science, asked by shraddhakumari9530, 2 months ago

write a program to accept a number. print its square and cube​

Answers

Answered by ghoshmitali000
1

Answer:

class ex2

{

public static void main (int n)

{

int s, c;

s=n*n;

c=n*n*n

System. out. println ("square="+s) ;

System. out. print ("cube="+c) ;

}

}

Similar questions