Print Pretty

  • + 1 comment

    i need help it fails on test cases 6-9 which involves 1000 test cases. Here is my code.

    #include<bits/stdc++.h>
    using namespace std;
    
    
    int main() {
        int t;
        double a, b, c;
        int decimal=2;
        cin>> t;
        for(int i=0; i<t; i++){
            cin>>a>>b>>c;
            int truncated = static_cast<int>(a);
            cout<<"0x"<<hex<<nouppercase<<truncated<<endl;
            
            cout<<setw(15)<<setfill('_')<<showpos<<fixed
            <<setprecision(decimal)<<b<<endl;
            
            cout<<noshowpos                       
            <<scientific<<uppercase<<setprecision(9)<<c<<endl;
        }
    return 0;
    }