# I have to write a c++ program for a square + b square ussing pow function. how to write?

1
Log in to add a comment

Log in to add a comment

System.out.println(Math.pow(b, 2));

If you are assigning the square to a specific variable,say 'x', then 'x' must be a 'double' type of value. It would be as follows:

double x = Math.pow(b, 2);