grodek118

Funkcje - pierwsze starcie (float)

Aug 12th, 2020
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. float dodawanie_inne()
  6. {
  7. float a;
  8. cin >> a;
  9. float b;
  10. cin >> b;
  11. return a + b;
  12. }
  13.  
  14. int main()
  15. {
  16. cout << "Wprowadz dzwie liczby: ";
  17. float wynik = dodawanie_inne();
  18. cout << "Wynik: " << wynik << endl;
  19. return 0;
  20. }
  21.  
Advertisement
Add Comment
Please, Sign In to add comment