Computer Science, asked by smartsaloni1503, 1 year ago

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

Answers

Answered by vivpamnani19990
1
If you need to get the square of the variable 'b' using the 'pow' function directly as the output; input the line as:
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);

smartsaloni1503: thanx
Similar questions