0
I can't find my error ?? code on series of 1+1/2+1/3.....1/n .
6 Respuestas
+ 2
As I said, your calculatuions are not correct.
Also your prints do not show the /
And in your first loop the condition is wrong now.
Please put some effort in it and ask again later, ok? It's not that hard.
Go through your code step by step.
+ 1
There is still a comma instead of semicolon in line 14, also i<1 makes the loop stop at the beginning.
In line 9 don't put semicolon after for-loop header
+ 1
Program is running now but it is always showing 12 after giving any input in a program why??
+ 1
Thanks for help i will try if i can make it correct
0
There are a lot of syntax errors.
In for loops you need semilocons, like
for(i=1;i<n;i++){
}
And in print statements you need commas
printf("%d",i);
Also not that division is done by forward slash / and not backward slash \
The error messages tell you on which lines you can find the mistakes.
Additionally your computation is not correct.
0
See now still error in code