I'm trying to run a factorial programme in c using cmd using DOS shell in turbo c7. The code is:
#include<stdio.h>
void main(int argc, char* argv[])
{
int i, n, fact = 1;
n = atoi(argv[1]);
for (i = 1; i <= n; i++)
{
fact = fact * i;
}
printf("Factorial is:%s\n",fact);
}
when I run it as fact.exe 3 The o/p is= factorial is:rland c++ -copyright 1991 borland Intl. What should I do?