You are on page 1of 2

#include <iostream>

using namespace std;


int main()
{
int x,y,z;
x > 0;
z > 0;
cin>>z;
cin>>x;
while(x>0)
{
cin>>y;
if(x<y-x) cout<<"* "<<x%10<<endl;
else cout<<"* "<<y%10<<endl;
x=y;
}
}
#include <iostream>
using namespace std;
int main()
{
int x,y,z;
x > 0;
z > 0;
cin>>z;
cin>>x;
while(x>0)
{
cin>>y;
if(x<y-x) cout<<"* "<<x%10<<endl;
else cout<<"* "<<y%10<<endl;
x=y;
}
}
#include <iostream>
using namespace std;
int main()
{
int x,y,z;
x > 0;
z > 0;
cin>>z;
cin>>x;

while(x>0)
{
cin>>y;
if(x<y-x) cout<<"* "<<x%10<<endl;
else cout<<"* "<<y%10<<endl;
x=y;
}
}

You might also like