task1.4.cpp 385 B

123456789101112131415161718
  1. // не делаю точь-точь
  2. #include <iostream>
  3. #include <algorithm>
  4. int main()
  5. {
  6. double DollorPart1,DollorPart2,UserInput;
  7. std::cout << "Введите число ";
  8. DollorPart1 = static_cast<int>(UserInput);
  9. DollorPart2 = static_cast<int>( (UserInput-DollorPart1) * 100 );
  10. std::cout << "Вывод: " << DollorPart1 << "" << "$" << "\n" << DollorPart2 << "¢";
  11. }