Hey, i need c++ coding to print sum of this series 1 + 1/11 + 1/21 + 1/31 + ... + 1/N
Would be great if someone could answer this quick, thanks.
Hey, i need c++ coding to print sum of this series 1 + 1/11 + 1/21 + 1/31 + ... + 1/N
Would be great if someone could answer this quick, thanks.
Well if we use integer math then the answer would be
#include <iostream>
int main()
{
std::cout << 1;
std::cin.get();
return 0;
}
Did you notice that the terms of your series consist of 1/(10*N + 1)
and not 1/N ?
How do we do this programme:
1111
1111
1111
1111
Do you know how to write the digit 1 on a piece of paper or something?
Can you count to 4?
Instruct a computer to do the same.