fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. float t[2];
  5. float suma, roznica, iloczyn, iloraz;
  6. int main() {
  7.  
  8. for(int i=0; i<2; i++)
  9. {
  10. cin>>t[i];
  11. suma += t[i];
  12. }
  13. cout<<endl<<"dodawanie:"<<suma;
  14.  
  15. for(int i=0; i<2; i++)
  16. {
  17. cin>>t[i], t[i+1];
  18. roznica = t[i] - t[i+1];
  19. }
  20. cout<<endl<<"odejmowanie:"<<roznica;
  21.  
  22. for(int i=0; i<2; i++)
  23. {
  24. cin>>t[i];
  25. iloraz = t[i-1]/t[i];
  26. }
  27. cout<<endl<<"dzielenie:"<<iloraz;
  28.  
  29. for(int i=0; i<2; i++)
  30. {
  31. cin>>t[i];
  32. iloczyn = t[i-1]*t[i];
  33. }
  34. cout<<endl<<"mno¿enie:"<<iloczyn;
  35. }
  36.  
  37.  
  38.  
  39.  
Success #stdin #stdout 0s 15224KB
stdin
3 0

stdout
dodawanie:3
odejmowanie:0
dzielenie:inf
mno¿enie:0