i have to write a c++ program for a square + b square ussing pow function. how to write?
Answers
Answered by
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);
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