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
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
Get step-by-step solutions from verified subject matter experts
