I'm trying to make a separate function that takes parameters x and y from the main function use use it in the powf, assign it to a variable 'result' and output it to the main function. Any help is appreciated
#include <stdio.h>
#include <math.h>
int  main() {
  float x = 5.5;
  float y = 3;
  float total = 1;
  int i;
  for( i=0; i <= y; i++ ) {
    total = total * x;
  }
  printf("total = %.3f\n",total);
  printf("Result of powf function is: %.3f\n", result);
  return 0;
}
float mathPow(float x, float y){
  result = powf(x,y);
  return result;
}
 
    