Created
June 2, 2022 19:56
-
-
Save ImShizer/26bac0240daace1f57b31fbc272625df to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main() { | |
setlocale(0, "ru"); | |
// double mass; | |
// cout << "Введите массу в тоннах: "; | |
// cin >> mass; | |
// int full_num = mass * 1000000; | |
// cout << "Тонны: " << (int)mass << '\n'; | |
// cout << "Килограммы: " << full_num % 1000000 / 1000 << '\n'; | |
// cout << "Граммы: " << full_num % 1000 << '\n'; | |
// Task 2 | |
// double seconds; | |
// cout << "Введите время в секундах: "; | |
// cin >> seconds; | |
// long long int hours = (int)seconds / 3600; | |
// long long int minutes = seconds / 60 - hours * 60; | |
// int res_secs = seconds - (hours * 3600 + minutes * 60); | |
// cout << hours << " часов "; | |
// cout << minutes << " минут "; | |
// cout << res_secs << " секунд \n"; | |
// Task 3 | |
// int seconds_start; | |
// int minutes_start; | |
// int hours_start; | |
// int seconds_end; | |
// int minutes_end; | |
// int hours_end; | |
// cout << "Введите время начала звонка (часы): "; | |
// cin >> hours_start; | |
// cout << "Введите время начала звонка (минуты): "; | |
// cin >> minutes_start; | |
// cout << "Введите время начала звонка (секунды): "; | |
// cin >> seconds_start; | |
// cout << "Введите время окончания звонка (часы): "; | |
// cin >> hours_end; | |
// cout << "Введите время окончания звонка (минуты): "; | |
// cin >> minutes_end; | |
// cout << "Введите время окончания звонка (секунды): "; | |
// cin >> seconds_end; | |
// int res_time = (seconds_end + minutes_end * 60 + hours_end * 3600) - (seconds_start + minutes_start * 60 + hours_start * 3600); | |
// int res_minutes = res_time / 60; | |
// cout << res_minutes * 0.15 << " грн - цена звонка \n"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment