While loop variable then cin to change the while loop variable to test condition again

Hello, I’m having some problems with my program, the loop variable when tested at first works fine then after input of a new value output is unexpected.

#include <iostream>
using namespace std;

int main(){
	int inputOne;
	int arrayLoop;
	int quotientValue=0;
	int arrayMain[99];
	
	cout<<"ENTER NUMBER TO CONVERT: ";
	cin>>inputOne;
	for(arrayLoop=0; quotientValue>=0 ; arrayLoop++){
		while (inputOne>=2){
			inputOne-=2;
			quotientValue++;
		}	cout<<"QUOTIENT IS: "<<quotientValue<<endl;
			cout<<"BINARY IS: "<<inputOne<<endl;
		arrayMain[arrayLoop]=inputOne;
		cout<<"Enter new quotient: ";
		cin>>inputOne;
	}
	while(arrayLoop>=0){
		arrayLoop=arrayLoop-1;
		cout<<arrayMain[arrayLoop];
	}
	return 0;
}

What did you try so far to solute this issue? Did you try a callstack? Checked that it wasn’t your browser? Did you try to Google examples of codes that are simulair to yours?

This does not relate to challenges here.

There are plenty of subjects here that don’t :3 as long as we can share and help our enthusiastme for code i see no harm.

This looks more like a homework problem then anything else.