незнайка1187
25.10.2020 18:27

Задание по информатике 7 класс


Задание по информатике 7 класс

Нажмите на рекламу ниже и сразу увидите ответ
Популярные вопросы:
Ответ:
asdfghjkl6tygb
21.02.2023 21:41

#include <iostream>

using namespace std;

int main()

{

   const int time = 86400;

   int a;

   cout << "Enter the time in seconds elapsed since the beginning of the day" << endl;

   cin >> a;

   int hh = a % time / 3600;

   int mm = a / 60 % 60;

   int ss = a % 60;

   int endhh, endmm, endss;

   int tmp = hh * 3600 + mm * 60 + ss;

   tmp = time - tmp;

   endhh = tmp / 3600;

   endmm = tmp / 60 - endhh * 60;

   endss = tmp - endmm * 60 - endhh * 3600;

   cout << "Now is: " << hh << " hh: " << mm << " mm: " << ss << " ss" << endl;

   cout << "before the midnight: " << endhh << " hh: " << endmm << " mm: " << endss << " ss" << endl;

   return 0;

}

Объяснение:

0,0(0 оценок)
Ответ:
алина3882
21.02.2023 21:41

#include <iostream>

using namespace std;

int main()

{

   const int time = 86400;

   int a;

   cout << "Enter the time in seconds elapsed since the beginning of the day" << endl;

   cin >> a;

   int hh = a % time / 3600;

   int mm = a / 60 % 60;

   int ss = a % 60;

   int endhh, endmm, endss;

   int tmp = hh * 3600 + mm * 60 + ss;

   tmp = time - tmp;

   endhh = tmp / 3600;

   endmm = tmp / 60 - endhh * 60;

   endss = tmp - endmm * 60 - endhh * 3600;

   cout << "Now is: " << hh << " hh: " << mm << " mm: " << ss << " ss" << endl;

   cout << "before the midnight: " << endhh << " hh: " << endmm << " mm: " << endss << " ss" << endl;

   return 0;

}

Объяснение:

0,0(0 оценок)
Полный доступ
Позволит учиться лучше и быстрее. Неограниченный доступ к базе и ответам от экспертов и ai-bota Оформи подписку
logo
Начни делиться знаниями
Вход Регистрация
Что ты хочешь узнать?
Спроси ai-бота