[Solved] Convert a `while` loop to a `for` loop
I think it should be something like this : for(;a<b–;){ for(d += a++ ; a != c ; ) { d += a++; } c+= a&b } The above logic works ! I ran both programs as below and they output the same result : Program1:[derived from your program 1] #include<stdio.h> int main(){ int a=10,b=10,c=10,d=10; … Read more