Created
January 28, 2016 11:38
-
-
Save JIghtuse/2d85d39437a2764e6496 to your computer and use it in GitHub Desktop.
std::get_money
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 <iomanip> | |
#include <iostream> | |
#include <locale> | |
using namespace std; | |
int main () | |
{ | |
istream& work{cin}; | |
cout.imbue(locale("ru_RU.utf8")); | |
long double amount; | |
while (work >> get_money(amount)) | |
cout << "Потрачено " << showbase << put_money(amount) << endl; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Читает копейки, а выводит рубли 😸