using c++ and SubRoutine.

Problem1: Design a function-oriented program that computes the total of the squares from 1 to n which n is supplied by a user. ex. 12345=1+4+9+16+25=55

Problem2:Design a function-oriented program that computes the factorial value of an input N
by a user ..Display the computed factorial value on the screen..

thanks to all.. i hope u can help me..:)

Recommended Answers

All 6 Replies

You have to attempt it, and if you run into trouble we may offer some help. Basically we don't do your homework for you.

I will help you with this at least, if 'n' grows even slightly large you will need a very large data type to store the sum. I would consider for most systems the "unsigned long long" type.

sir,
this is not my homework..i only want to get advance for my study in c++. this problem is in my book. which have a problem statement like this. thanks,

this is not my homework..i only want to get advance for my study in c++.

I fail to see how it not being homework somehow exempts you from making an honest attempt.

thank you sir...dont help if you want...

You've had a whole day to work on this. Do you still have absolutely nothing to show for it? If so, that confirms our suspicions that you're just looking for a handout.

Seems like people trying to learn programming get lazier and lazier every day....

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.