task1.3.cpp 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #include <iostream>
  2. int main()
  3. {
  4. char TABLE_TEXT[10000] = R"(
  5. $$$$$$$$\ $$$$$$\ $$\ $$\ $$$$$$$$\ $$$$$$\ $$$$$$\ $$\ $$\ $$\ $$\ $$$$$$$$\ $$$$$$$\ $$$$$$$$\ $$$$$$$$\ $$$$$$$\
  6. \__$$ __|\_$$ _|$$$\ $$$ |$$ _____| $$ __$$\ $$ __$$\ $$$\ $$ |$$ | $$ |$$ _____|$$ __$$\\__$$ __|$$ _____|$$ __$$\
  7. $$ | $$ | $$$$\ $$$$ |$$ | $$ / \__|$$ / $$ |$$$$\ $$ |$$ | $$ |$$ | $$ | $$ | $$ | $$ | $$ | $$ |
  8. $$ | $$ | $$\$$\$$ $$ |$$$$$\ $$ | $$ | $$ |$$ $$\$$ |\$$\ $$ |$$$$$\ $$$$$$$ | $$ | $$$$$\ $$$$$$$ |
  9. $$ | $$ | $$ \$$$ $$ |$$ __| $$ | $$ | $$ |$$ \$$$$ | \$$\$$ / $$ __| $$ __$$< $$ | $$ __| $$ __$$<
  10. $$ | $$ | $$ |\$ /$$ |$$ | $$ | $$\ $$ | $$ |$$ |\$$$ | \$$$ / $$ | $$ | $$ | $$ | $$ | $$ | $$ |
  11. $$ | $$$$$$\ $$ | \_/ $$ |$$$$$$$$\ \$$$$$$ | $$$$$$ |$$ | \$$ | \$ / $$$$$$$$\ $$ | $$ | $$ | $$$$$$$$\ $$ | $$ |
  12. \__| \______|\__| \__|\________| \______/ \______/ \__| \__| \_/ \________|\__| \__| \__| \________|\__| \__|
  13. )";
  14. int UserInput,ConverMinute,ConverHours,UserChant;
  15. std::cout << TABLE_TEXT << "\n" << "Введите любое число (секунды) \n";
  16. std::cin >> UserInput;
  17. std::cout << "Во что вы хотите перевести (Минуты - 2 Часы - 3 Всё сразу - 23)\n";
  18. std::cin >> UserChant;
  19. switch (int(UserChant))
  20. {
  21. case 2:
  22. ConverMinute = (UserInput % 3600)/60;
  23. std::cout << "Вывод: " << ConverMinute;
  24. break;
  25. case 3:
  26. ConverHours = UserInput/3600;
  27. std::cout << "Вывод: " << ConverHours;
  28. break;
  29. case 23:
  30. ConverMinute = UserInput/60;
  31. ConverHours = UserInput/60;
  32. std::cout << "Вывод " << "\n" << "Минуты " << ConverMinute << "\n" << "Часы " << ConverHours;
  33. break;
  34. default:
  35. std::cout << "Ничего не выбрано";
  36. break;
  37. }
  38. }