Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- /* FUNKCJA - składnia
- typ_zwracany nazwa_funkcji([argumenty_wejściowe])
- {
- ciało_funkcji
- }
- */
- int suma(int a, int b)
- {
- return a + b;
- }
- int main()
- {
- cout << suma(3, 8) << endl;
- cout << suma(100, 20) << endl;
- int liczba1, liczba2;
- cin >> liczba1 >> liczba2;
- cout << suma(liczba1, liczba2) << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement