Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iomanip>
- #include <locale>
- #include <sstream>
- #include <string.h>
- void rupiah(){
- ostringstream convert;
- convert<<totalHarga;
- hargaTotal=convert.str();
- const char* hargatotal=hargaTotal.c_str();
- for(int kounter=0;kounter<strlen(hargatotal);kounter++){
- konversi[strlen(hargatotal)-kounter-1]=hargatotal[kounter];
- }
- for(int kounter=strlen(hargatotal)-1;kounter>=0;kounter--){
- cout<<konversi[kounter];
- if(kounter%3==0){
- if(kounter!=0){
- cout<<".";
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement