[ create a new paste ] login | about

Link: http://codepad.org/QZ1CPcx8    [ raw code | output | fork ]

C++, pasted on Jan 27:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <string>
#include <iostream>
#include <algorithm>
using namespace std;

int main(){
    float val = 1.4306f;
    string line;
    stringstream ss;
    ss<<val;
    ss>>line;
    cout<<"input   : "<<line<<endl;
    reverse(line.begin(), line.end());
    cout<<"reverce : "<<line<<endl;
    
    return 0;
    
}


Output:
1
2
input   : 1.4306
reverce : 6034.1


Create a new paste based on this one


Comments: