123456789101112131415161718 |
- // не делаю точь-точь
- #include <iostream>
- #include <algorithm>
- int main()
- {
- double DollorPart1,DollorPart2,UserInput;
- std::cout << "Введите число ";
- DollorPart1 = static_cast<int>(UserInput);
- DollorPart2 = static_cast<int>( (UserInput-DollorPart1) * 100 );
- std::cout << "Вывод: " << DollorPart1 << "" << "$" << "\n" << DollorPart2 << "¢";
- }
|