sir i am being given a task to make a program which evaluate the fictorial of a given number, using loops. please guide me who i could do this

Recommended Answers

All 7 Replies

@OP

for (i = 1 to number) {
     answer *= i;
}

thanks alt. can u please also tell me about the how to make a function which takes two numbers from users and outputs their power. i.e (x^ y). the task assigned to me is actually the making of maclaurians series. i would be very grateful if u help me in this task.

sir the (i to number) is giving error in compiling.

commented: Fail. -3

That is because myk45 gave you pseudocode instead of C++. If you do not know how to translate what myk45 wrote into C++, then you are probably in serious trouble, and you should consider dropping the course.

commented: Agreed +16

sir i am new at c++. i think u should nt say anyone like this. if u can t help its ok.

I'm sorry if I've offended you, but this discussion group doesn't do other people's homework for them.

I'm sorry if I've offended you,

There's no need to apologize, our rules here at Daniweb clearly say:

Do provide evidence of having done some work yourself if posting questions from schoolwork assignments

So if someone needs to apologize, it's the OP for not reading/obeying the rules and insulting your intelligence by implying that you do not know how to use a simple loop.

We currently have far too many homework-kiddo's who come here with the only purpose of getting a homework freebie without putting in any effort themselves. Pointing out the rules to these people is a good thing.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.