Category : for-loop

I am following alone to a YouTube C++ tutorial on creating arrays using loops on Vscode for MacOSx. https://www.youtube.com/watch?v=Z9Wc8EsGjJY This is the for loop I wrote for(;int x=0; x<=8, x++){ The terminal keeps giving me this warning: warning: relational comparison result unused [-Wunused-comparison] for(;int x=0; x<=8, x++){ And as a result my array isn’t printed. ..

Read more

**The void function automatically rounds off the value of a,b,c and prints out 0 instead of 0.5,0.33,0.166. I have checked the value of num1,num2,num3 and g they are correct just the problem is with the rounding off of the decimals of a,b and c.The setprecision function is also not working. The simple concept is when ..

Read more

Kindly pl correct my if-else statement if you get the position where i made the mistake.Pl ignore space-time complexity for this problem.Ignore conditions i have checked they are correct.I have correct conditions applied,i am thinking of using switch statements instead of if-else.Tell me the mistakes so that i can correct them in my if statements. ..

Read more