===== C++ 17 =====
#include <iostream>
using namespace std;
long seconds(int h, int m)
{
return (long)3600 * h + 60 * m;
}
int main()
int h, m, s;
cin >> h >> m;
cout << seconds(h, m);
return 0;
Ответ:
int dich(int hour, int min )
int sec= hour*3600+min*60;
return sec;
int Main( )
int chasiki, minutachki, sicundachki;
cin>>chasiki>>minutachki;
sicundachki = dich(chasiki, minutachki);
cout<<"sicundachki="<<sicundachki ;
❤️
Copyright © 2025 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
===== C++ 17 =====
#include <iostream>
using namespace std;
long seconds(int h, int m)
{
return (long)3600 * h + 60 * m;
}
int main()
{
int h, m, s;
cin >> h >> m;
cout << seconds(h, m);
return 0;
}
Ответ:
int dich(int hour, int min )
{
int sec= hour*3600+min*60;
return sec;
}
int Main( )
{
int chasiki, minutachki, sicundachki;
cin>>chasiki>>minutachki;
sicundachki = dich(chasiki, minutachki);
cout<<"sicundachki="<<sicundachki ;
}
❤️