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 223 views
1 answer 194 views
1 answer 176 views
1 answer 280 views
1 answer 140 views
2 answers 269 views
...