#include<stdio.h>

void main(void)
{

int n,j, fact;

printf("\nENTER A NUMBER:");
scanf("%d",&n);


fact=1;
for(j=1;j<=n;j++1)
fact=fact*j;
printf("\nThe factorial of %d is %d",n,fact);
}

I have problem in for(j=1;j<=n;j++1).Please help me.

Change for(j=1;j<=n;j++1) to for(j=1;j<=n;j++).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.