Q:

float vs int when using power function

I am trying to run this and cant seem to find out why it wont run. Thank you in advance. Please know I am new.
#include <stdio.h>
#include <math.h>

int main(void)
{
float IR;
float invested;
float time;

printf("Please enter the following to be calculated:");
scanf("Interest rate: %f\n", &IR);
scanf("Amount invested: %f\n", &invested);
scanf("Time: %f\n", &time);

float ans;
ans = (invested(((float)1+((IR)^(time)))));

printf("%f", ans);
}

A:

^ is not the power function.  you need to use ans = invested * (1 + pow(IR, time)); 
^ is a Bitwise exclusive OR XOR.

