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 324 views
1 answer 289 views
1 answer 264 views
1 answer 366 views
1 answer 228 views
2 answers 400 views
...