^^I tried that and i get a 0.
Edit - Mr Law was right. I made sum = 1, deleted the dum=sum assignment and changed the input to dum instead of sum.
num = 1;
sum = 1;
printf("Enter number:...
Type: Posts; User: drmk4
^^I tried that and i get a 0.
Edit - Mr Law was right. I made sum = 1, deleted the dum=sum assignment and changed the input to dum instead of sum.
num = 1;
sum = 1;
printf("Enter number:...
What would you suggest?
Hi there. I'm trying to write up a simple factorial code yet i'm finding it difficult to get around.
Here is the code i have so far
#include <stdio.h>
int main() {
int num, sum, dum;