How to set scientific notation value to double variable in C++

1 Answer

0 votes
#include <iostream>

int main() {
    double scientificd = 1.23456e4;

    std::cout << scientificd;
}




/*
run:
    
12345.6
    
*/

 



answered Aug 1, 2022 by avibootz

Related questions

1 answer 320 views
1 answer 281 views
1 answer 260 views
1 answer 359 views
1 answer 219 views
2 answers 391 views
...