#include #include using namespace std; void lisaa(int *h, int *m, int lisa_min) { int yht_min = *h*60 + *m + lisa_min; *h = yht_min / 60; *m = yht_min % 60; } void tulosta(int h, int m) { char oldfill = cout.fill('x'); cout << setfill('0') << setw(2) << h << ":" << setw(2) << m << endl; cout.fill(oldfill); } int main(void) { int h1=12,m1=05; int h2=13,m2=16; int h3=14,m3=25; lisaa(&h1,&m1,54); tulosta(h1,m1); lisaa(&h2,&m2,27); tulosta(h2,m2); lisaa(&h3,&m3,39); tulosta(h3,m3); return 0; }