This is my test code
#include<iostream>
using namespace std;
int main()
{
uint8_t a;
while(1)
{
cin>>a;
if(a == 0) break;
cout<<"Input is "<<a<<endl;
}
}
When I execute (with my inputs), this is what I get
1
Input is 1
2
Input is 2
12
Input is 1
Input is 2
0
Input is 0
3
Input is 3
Problem1: It takes input 12 as two separate inputs
Problem2: Condition if a==0 doesn't work
What might be the problems?