-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathfunkcje.cpp
41 lines (34 loc) · 876 Bytes
/
funkcje.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//
// funkcje.cpp
// 1-programowanie-strukturalne\1-3-struktury-danych\1-3-3-funkcje\
//
// Created by Jakub Piskorowski on 03/01/2022 wersja: 1.0
// Copyright © 2022 Jakub Piskorowski. All rights reserved.
// GitHub: https://github.com/PiskorowskiJakub/programming-course-cpp
//
// Przedstawienie czym sa funkcje oraz jak ich uzywac
//
#include <iostream>
using namespace std;
int Funkcja1(int a, int b);
void Funkcja2();
void Funkcja3(float a);
int main() {
int wynik = Funkcja1(4, 6);
cout << "Wynik: " << wynik << endl;
cout << "Ten sam wynik" << Funkcja1(4, 6) << endl;
Funkcja2();
Funkcja3(4.7);
}
int Funkcja1(int A, int B) {
int wynik;
wynik = A + B;
return wynik;
}
void Funkcja2() {
cout << "Funkkcja pusta" << endl;
}
void Funkcja3(float liczba) {
liczba += 10;
cout << "Wpisales liczbe: " << liczba;
}