Professional Documents
Culture Documents
C Programs
C Programs
#include<stdio.h>
main()
int n,i,fact;
fact=1;
scanf ("%d",&n);
for (i=1;i<=n;i++)
fact=fact*i;
}
Table of entered number
#include<stdio.h>
main()
int n,i;
scanf ("%d",&n);
for (i=1;i<=10;i++)
}
To check d no is prime or not..
main()
{
int a,c=0,i,n;
printf("enter the number to be checked");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
a=n%i;
if(a=0)
{
c=c+1;
}
}
if (c=2)
{ printf("the given number is prime"); }
else
printf("the given number is not prime");
}