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 203 views
1 answer 181 views
1 answer 168 views
1 answer 271 views
1 answer 134 views
2 answers 254 views
...