26 lines
458 B
C++
26 lines
458 B
C++
/*
|
|
FUNKCJE
|
|
typ_zwracany nazwa_funkcji(lista_parametrow) {
|
|
instrukcje
|
|
}
|
|
|
|
ZAD. NAPISZ FUNKCJE DODAJ KTORA PRZYJMUJE DWIE LICZBY CALKOWITE I ZWRACA ICH SUME
|
|
*/
|
|
|
|
#include <iostream>
|
|
|
|
using namespace std;
|
|
|
|
int oblicz(int x, int y) {
|
|
return x + y;
|
|
}
|
|
|
|
int main() {
|
|
int a, b;
|
|
|
|
cout << "Podaj dwie liczby (a, b): " << endl;
|
|
cin >> a >> b;
|
|
cout << "Wynik obliczenia = " << oblicz(a, b) << endl;
|
|
|
|
return 0;
|
|
}
|