ok so i have this code and i must be missing something, im just starting to program and need to make a similar program to this but i just cant understand too much of this code can someone run through it with me (like almost line for line after the first {.
Thank you heres the code its a factorial program
Sorry for not formatting it right, im fairly new here
Code:
.
#include<stdio.h>
main()
{
int n,a;
int b(int );
printf("Enter positive number less than 10\n");
scanf("%d",&n);
a=b(n);
printf("\nResults of: %d",n,a);
}
int b(int n)
{
int k;
if(n==1)
return(1);
else
k=n*b(n-1);
return(k);
}
.
ok think i got it right this time
//*again thank you even just for looking*//