Răspuns :
#include<iostream>
using namespace std;
int main()
{int h,m,x,a,b; a=0;b=0; cin>>x;
while(x!=0)
if(x<60)
{if(x+j)<60;
cout<<h<<" "<<x+j;
else
a=x+j-60;
h=h+(x+j)-a;
m=a;
cout<<h<<" "<<m;}
else
b=x-60;
h=(x+h)-b;
m=m+b;
cout<<h<<" "<<m;}
.
using namespace std;
int main()
{int h,m,x,a,b; a=0;b=0; cin>>x;
while(x!=0)
if(x<60)
{if(x+j)<60;
cout<<h<<" "<<x+j;
else
a=x+j-60;
h=h+(x+j)-a;
m=a;
cout<<h<<" "<<m;}
else
b=x-60;
h=(x+h)-b;
m=m+b;
cout<<h<<" "<<m;}
.
Poftim rezolvarea. Daca nu se primeste cu printf si scanf - citeste si returneaza cu cin, cout.