#include<iostream>
#include<sstream>
#include<iomanip>
using namespace std;
int main(){
 int integer;
 string str;
 double doulb;
 while(cin>>str){
    stringstream strm(str);
    if(strm>>integer &&strm.eof()==1)
         cout << "Integer: " << showbase << hex << integer << endl;
  
    else{
         strm.str(str);
         if(strm>>doulb && strm.eof()==1)
         cout << "Double: " << fixed << setprecision(6) << doulb << endl;
         else
             cout << "String: " <<str<< endl;
   
         }
 }
 return 0;
}

posted on 2016-10-22 13:16  任我主宰  阅读(99)  评论(0编辑  收藏  举报