Cod sursa(job #614946)
Utilizator | Data | 8 octombrie 2011 09:52:17 | |
---|---|---|---|
Problema | Barbar | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.4 kb |
#include <iostream>
using namespace std;
int main()
{
int x,y,z ;
cout<<"z=";
cin>>z;
cout<<"x=";
cin>>x;
while (x>0)
{
cout<<"y=";
cin>>y;
if (z<y-x)
cout<<x%10<<endl;
else
cout<<y%10<<endl;
x=y;
}
system("pause");
return 0;
}