Help me out with c++ | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Help me out with c++

i have absolutely no idea how to solve a problem somebody help me out

25th Aug 2017, 11:23 AM
Henrique Sued
Henrique Sued - avatar
6 Answers
+ 16
Correction : U have misplaced if statement place it under while Tips : If the if statement has only one line so u can remove {} to make it short https://code.sololearn.com/cWJm4tJFdIe7/?ref=app
25th Aug 2017, 12:21 PM
P R
P R - avatar
+ 16
please explain what is your problem
25th Aug 2017, 11:40 AM
P R
P R - avatar
25th Aug 2017, 12:22 PM
๐Ÿ‘‘ Prometheus ๐Ÿ‡ธ๐Ÿ‡ฌ
๐Ÿ‘‘ Prometheus ๐Ÿ‡ธ๐Ÿ‡ฌ - avatar
+ 2
https://code.sololearn.com/ciK50d1hXCKM/?ref=app
25th Aug 2017, 12:08 PM
Henrique Sued
Henrique Sued - avatar
+ 1
actually, forget the S==100, i kinda used 100 as a the "break" to stop the loop
25th Aug 2017, 12:34 PM
Henrique Sued
Henrique Sued - avatar
+ 1
well, i wantend to test values for b, from 1 to 10 whether they are even or odd and then, for each case, perform a different procedure {S-=b/(b*b)} if it's even and {S+=b/(b*b)} if it's odd. Finally, i wanted to print the results for each value of b tested for these conditions
25th Aug 2017, 12:59 PM
Henrique Sued
Henrique Sued - avatar