I'm working on an assignment that wants me to recursively determine the value of the nth term of a geometric sequence defined by the terms

a, ar, ar^2(squared), ar^3(cubed),.....ar^n-1

It also note that the argument should be the first term a, the common ratio r, and the value of n

The section in the book covers recursion very briefly and I'm struggling to figure out how to start this assignment. Any pointers or exampes to get me going would greatly be appreciated

The code is not the assignment but the only skeleton the book gives of recursion

Code:
#include
<stdio.h>
#pragma
warning (disable : 4996)
int
 main ()
{
	
int n, result;
	
int factorial (int);
	printf(
"Enter a number: ");
	scanf(
"%d", &n);
	result = factorial(n);
	printf(
"\nThe factorial of %d is %d\n", n, result);
	
return 0;
}
int
 factorial (int result)
{
	result