473,466 Members | 1,430 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

c factorial program

3 New Member
how do i write a program to calculate the factorial of any number using c functions?
Sep 27 '07 #1
7 2602
ilikepython
844 Recognized Expert Contributor
how do i write a program to calculate the factorial of any number using c functions?
What have you tried on this? I am sure there are many sites on the internet about that.
Sep 27 '07 #2
mabla
3 New Member
how do i write a program to calculate the factorial of any number using c functions?
how do i use the c functions and the operators?
Sep 27 '07 #3
ilikepython
844 Recognized Expert Contributor
how do i use the c functions and the operators?
Once, again, have you tried doing at least some of it by yourself? Here we don't spoonfeed solutions. Do you know how to calculate factorial with paper and pencil? If you do, it should be easy to turn it into an algorithm.
Sep 27 '07 #4
mabla
3 New Member
What have you tried on this? I am sure there are many sites on the internet about that.
i have tried to use simple factorial program but still it is not what l am looking for. i need a written program for progress sake that is some tangible.
Sep 27 '07 #5
oler1s
671 Recognized Expert Contributor
I don't think we quite understand what you are asking. I mean, as a smart person, you clearly googled for "C" and "Functions" and did the requisite reading. And you obviously aren't trying to cheat by asking for one of us to do your homework. So what are you asking?
Sep 27 '07 #6
weaknessforcats
9,208 Recognized Expert Moderator Expert
Please read the posting guidelines.
Sep 27 '07 #7
ruskalym
65 New Member
Laziness kills

<code removed>

Please don't spoonfeed any code, it doesn't help the OP at all. Please read
the forum guidelines (the 'Help' link near the top right corner of this page).

kind regards,

Jos
Sep 27 '07 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: Martin Jørgensen | last post by:
Hi, Consider (factorial.cpp): #include <iostream> using namespace std; double R=3.2; /* not used, but R is static because it is a global variable (file scope) */
35
by: aNt17017 | last post by:
This is my code: long fact(int n) { if (n == 0) return(1); if(n > 100) { printf("\t\tERROR: %d is too large for factorial.\n", n); return 1;
8
by: salman | last post by:
this program is giving compile time error. so plse ge me the logic of factorial # include <iostream.h> # include <math.h> void main() { int f,sum=0,i,j,n; cout<<"\nEnter Number: ";
1
by: Tin | last post by:
Dear Sir/Madam, I have one assignment , which need me to write a program to calculate the factorial of an integer, then press the button that would display the result in a label.3 & the...
59
by: Umesh | last post by:
i wrote the following program to calculate factorial: #include<stdio.h> #include<iostream.h> void main() { int i,n; long int p=1; // or long double p=1; for exponential result which I don't...
3
by: Sugandh Jain | last post by:
Hi. How to write a function that will return me the factorial (say in a string) for the any positive integer it takes? When we find a factorial of even say 2000 or a higher number, it will be...
12
by: dynamo | last post by:
Hello everyone,i am a beginner in c++ and i am trying to write a program that outputs the factorial of a number in my own way,however i don't know why it's not working.Thanks for any help.This is the...
1
by: doctor309 | last post by:
hello friends iam not able to get logic behind solving the question mentioned below,,,,i tried a lot using various books.....online tutorials but at the end just lost it...... you ppl are kindly...
2
by: becky808 | last post by:
Hi, I'm trying to write a program to calculate n factorial but it won't compile. Can anyone tell me what I'm doing wrong? #include <iostream> #include <cmath> using namespace std; int...
3
by: Blue sky | last post by:
Hi,I am a new C++ learner.The follow prgram produces a wrong result,but I can't find the wrong.Can you help me?Thank you! #include<stdio.h> long factorial( long number); int main() { int...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.