If you’re calculating an infinite series, you want to add the terms, not multiply them… i.e. answer=answer+next_term;
More Related Contents:
- How to pass arguments
- Why when I print it appears 80 for *str in decimal (letter P in ASCII)?
- Is there still room for optimization in this part of the code?
- read specific number of chars in c [closed]
- Wrong Answer in Online Judge (CODECHEF)
- Why does unaligned access to mmap’ed memory sometimes segfault on AMD64?
- Validate the type of input in a do-while loop C
- How do I understand complicated function declarations?
- How can I allocate memory and return it (via a pointer-parameter) to the calling function?
- Arguments to main in C [duplicate]
- String literals vs array of char when initializing a pointer
- Can FFmpeg be used as a library, instead of a standalone program?
- Sleep function in Windows, using C
- C – Accessing data AFTER memory has been free()ed?
- scanf ignoring, infinite loop
- allocate matrix in C
- How are variable names stored in memory in C?
- Macro expansion and stringification: How to get the macro name (not its value) stringified using another macro?
- Read input.txt file and also output.bmp file from terminal (C-programming)
- Why is memcmp so much faster than a for loop check?
- Manipulate multidimensional array in a function
- How to convert int to float in C?
- Different way of accessing array elements in C
- winapi: CreateProcess but hide the process’ window?
- What’s the proper implementation for hardware emulation?
- declaring variables without any data type in c
- Casting void pointers
- Evaluate Mathematical Function from String [closed]
- Detecting mismatched array enum initializers
- Multiple assignment in one line