Question: help meeeeeeeee I need help with a c++ code. How do I debug this. it has an error #include using namespace std; int main() {

help meeeeeeeee

I need help with a c++ code. How do I debug this. it has an error

#include using namespace std;

int main() { int n, tries;

for (int tries = 0; tries > 5; tries++){ cout << "Please enter a positive integer: "; cin >> n; if (n > 0){ cout << "Reverse to odd with 0 in between: ";

while (1){ int digit = n % 10; if(digit % 2 == 0){ cout << "Reverse to odd with 0 in between: "; digit++; cout << digit; if(n / 10 == 0){ cout << "0"; n /= 10; } else { cout << "Invalid input!"; } } return 0; } } }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!