fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. float a, b, c, srednia, suma;
  7.  
  8. cout << "Podaj trzy liczby\n";
  9. cin >> a >> b >> c;
  10.  
  11. suma = a + b + c;
  12. srednia = suma / 3;
  13.  
  14. cout << "Suma wynosi: " << suma << "\n";
  15. cout << "Srednia wynosi: " << srednia;
  16.  
  17. return 0;
  18. }
Success #stdin #stdout 0s 5320KB
stdin
Standard input is empty
stdout
Podaj trzy liczby
Suma wynosi: -1.53415e-32
Srednia wynosi: -5.11382e-33