Revision as of 18:45, 13 May 2024 by Admin (Created page with "Write a function to raise a floating point number to an integer power, so for example to when you use it <syntaxhighlight lang="c"> float a = raise_to_power(2, 3); //a gets 8 float b = raise_to_power(9, 2); //b gets 81 float raise_to_power(float f, int power); //make this your declaration </syntaxhighlight>")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
ABy Admin
May 13'24

Exercise

Write a function to raise a floating point number to an integer power, so for example to when you use it

float a = raise_to_power(2, 3);    //a gets 8
float b = raise_to_power(9, 2);    //b gets 81
float raise_to_power(float f, int power);    //make this your declaration