fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. double a,b,suma,iloczyn,iloraz;
  6. cin>>a;
  7. cin>>b;
  8. cout<<"Podałeś liczbę a="<<a<<endl;
  9. cout<<"Podałeś liczbę b="<<b<<endl;
  10. suma=a+b;
  11. iloczyn=a*b;
  12. cout<<"Suma a+b="<<suma<<endl;
  13. cout<<"Iloczyn liczb a*b="<<iloczyn<<endl;
  14. if(b!=0){
  15. iloraz=a/b;
  16. cout<<"Iloraz a/b="<<iloraz<<endl;
  17. }
  18. else{
  19. cout<<"Dzielenie nie jest wykonane"<<endl;
  20. }
  21. return 0;
  22. }
Success #stdin #stdout 0.01s 5288KB
stdin
Standard input is empty
stdout
Podałeś liczbę a=4.65773e-310
Podałeś liczbę b=6.95266e-310
Suma a+b=1.16104e-309
Iloczyn liczb a*b=0
Iloraz a/b=0.669921