CS Electrical And Electronics
@cselectricalandelectronics

Find error in c code? The code is to find factorial of number?

All QuestionsCategory: C LanguageFind error in c code? The code is to find factorial of number?
CS Electrical And Electronics Staff asked 4 years ago

Code:

#include<stdio.h>
int main()
{
int n,i;
int m=1;
print(“enter number for factorial\n”);
scan(“%d”,&n);
for(i=1;i<=n;i++)
m=m*i;
printf(“value of factorial=%d\n”,m);
//Chetan Shidling
return 0;
}

There are two errors in this code, find out and explain the working of code.