fork download
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4.  
  5. int main() {
  6. double a = 5.123 * pow(10, -1); // 5.123 * 10^-1
  7. double b = 4.987 * pow(10, 2); // 4.987 * 10^2
  8.  
  9. double iloczyn = a * b;
  10. double suma = a + b;
  11.  
  12. cout << "Iloczyn = " << iloczyn << endl;
  13. cout << "Suma = " << suma << endl;
  14.  
  15. return 0;
  16. }
  17.  
Success #stdin #stdout 0s 5308KB
stdin
Standard input is empty
stdout
Iloczyn = 255.484
Suma = 499.212