#include
#include
using std::cin;
using std::cout;
using std::endl;
using std::tolower;
long factorial(int N);
int main()
{
int N = 0; //factorial of N
char command = 'n';
do
{
cout << "Enter a number to calculate factorial: ";
cin >> N;
cout << endl << "Factorial of " << N << " is: " << factorial(N) << endl;
cout << "Do you want to continue (y/n)?";
cin >> command;
cout << endl;
} while ('y' == tolower(command));
system("PAUSE");
return 0;
}
long factorial(int N)
{
if (N == 0)
{
return 1;
}
else
{
return (N * factorial(N - 1));
}
}
write a c program to accept a number and generate a square root cube and exponential values
#include#includevoid main(){ int a,i;printf("\nThe Multiplication table of 5 is:\n");for(i=1;i
c code for top down parser
Class&genus
(rand()&50+1)*2
i dn't know. haha
write a c program to display marks,total,average,grade using union
Peterson Number:145 = 1! + 4! + 5!number=sum of (factorials of digits)
You need to get an SDK for the device you are planning to program for, SDK also lets you run your program on PC in an emulator. Once written you can then compile the program for device which would generate an installer package that you can then install on the device.
You need to be more specific in what you are asking. For example, the following meets your requirements: int main() { printf("a a b a b c\n"); return 0; }
#include #include void main() { clrscr() int a=0,b=1,c,i,n; coutn cout
A compiler produces object code, which is an obj file.