Question: I used the code that you gave in your answer and im getting an error code when trying to submit. I attatched a picture of

I used the code that you gave in your answer and im getting an error code when trying to submit. I attatched a picture of the error codes. PLEASE fix for me and send the new revised code. THANK YOU!
CODE USED
#include
using namespace std;
int main(){
int n, count =0;
cin >> n;
while (n !=1){
cout n "\t";
if (count %10==0){
cout endl;
}
if (n %2==0){
n /=2;
} else {
n =3* n +1;
}
}
cout n;
cout endl;
return 0;
}
I used the code that you gave in your answer and

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 Programming Questions!