converting a for loop to a while loop C++
#include <iostream>
int main() {
int i = 0;
while (i < 5) {
// Code inside the loop
std::cout << "Iteration " << i << std::endl;
// Increment the loop variable
i++;
}
return 0;
}