mirror of
https://github.com/szymon-jozef/ZUT-notatki.git
synced 2026-10-28 11:10:38 +01:00
notatki
This commit is contained in:
14
uczelnia/2_semestr/programowanie/laby/lab2/zad8.cpp
Normal file
14
uczelnia/2_semestr/programowanie/laby/lab2/zad8.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
double srednia(int a, int b, int c) { return (double)(a + b + c) / 3; }
|
||||
void wyzeruj(int &x) { x = 0; }
|
||||
|
||||
int main() {
|
||||
cout << "Średnia 2,2,3 to: " << srednia(2,2 , 3) << endl;
|
||||
int a = 6;
|
||||
cout << "a = " << a << endl;
|
||||
cout << "zerujemy" << endl;
|
||||
wyzeruj(a);
|
||||
cout << "a = " << a << endl;
|
||||
}
|
||||
Reference in New Issue
Block a user