December 25th, 2013, 12:31 AM
To write a C program to calculate the following sum;
sum=1+x2/2!+x4/4!...... upto given n terms
December 25th, 2013, 01:48 AM
So what have you written so far?
Up the Irons
What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
"Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
Down with Sharon Osbourne
"I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo
December 25th, 2013, 10:13 AM
The question of "what compiler should I recommend to my readers?" is perfectly legitimate without the subterfuge - what made you think that was necessary?
There is nothing "unofficial" about Orwell Dev-C++. Dev-C++ was always open-source and anyone was free to fork it. When it became no longer maintained by Bloodshed, Orwell picked up the batton. Bloodshed Dev-C++ should certainly be avoided.
It's fine, it is not however a compiler. It is an IDE. It is distributed with MinGW GCC which is as good a C++ compiler as any.
The biggest problem with Bloodshed Dev-C++ was its debugger (or rather its integration with GDB), it was buggy and very limited. I do not know whether Orwell has improved that.
Another problem with Dev-C++ (all variants) is that it is written in Delphi, so has never attracted a large number of developers to maintain and enhance the project.
A good alternative is Code::Blocks. This too is an IDE which on Windows is distributed with MinGW, but it is more fully featured, more widely supported, cross platform, and has a working debugger.
Personally however I'd recommend VC++ Express Edition. It is free, very well featured, and has about the best debugger in the business.
December 25th, 2013, 12:06 PM
Perhaps you can see the obviousness of the loop, if you understand that the first term can also be written as
December 25th, 2013, 05:31 PM
What is the relationship between n and the nth term? From the example it is not clear whether the series is:
0, 2, 4, 6, 8, ... (i..e all even numbers)
1, 2, 4, 8, 16, ... (i.e. all powers of two)
or something else entirely.