Hey guys, I'm new to C programming, taking a course for EE.
This is the question: C does not have an exponentiation operator. Write a C program that allows the user to enter the base a and the exponent b and prints the value of (a^b). You may not use any library functions other than printf and scanf. Assume b is an integer.
So I have my program but when you input a and b, it seems like it hang ups, no output. When you press enter many times, it doesn't do anything. Only when you input something (when you are not suppose), does it display the printf statement.
Can anyone help me out? thanks
here is the code:
int main ()
printf("\nEnter base value a: ");
printf("\nEnter exponent value b: ");
printf("\nThe answer is %.2f", c);