You are viewing a single comment's thread. Return to all comments →
This is my code and its passing testcase0 but its failing in other test cases so what is the issue
using namespace std;
int main() { int T; cin >> T; cout << setiosflags(ios::uppercase); cout << setw(0xf) << internal; while(T--) { double A; cin >> A; double B; cin >> B; double C; cin >> C; int a= static_cast(A); char hex[1000]; std::sprintf(hex,"%X",a); cout<
string sign; if(B>=0){ sign="+"; } else{ sign="-"; } cout <<"_______"<<sign<<std::fixed<<std::setprecision(2)<<B<<endl; std::cout << std::scientific <<setprecision(9) <<C << std::endl; } return 0;
}
Seems like cookies are disabled on this browser, please enable them to open this website
Print Pretty
You are viewing a single comment's thread. Return to all comments →
This is my code and its passing testcase0 but its failing in other test cases so what is the issue
include
include
using namespace std;
int main() { int T; cin >> T; cout << setiosflags(ios::uppercase); cout << setw(0xf) << internal; while(T--) { double A; cin >> A; double B; cin >> B; double C; cin >> C; int a= static_cast(A); char hex[1000]; std::sprintf(hex,"%X",a); cout<
}