mirror of
https://github.com/szymon-jozef/ZUT-notatki.git
synced 2026-09-07 20:20:39 +02:00
9 lines
263 B
C++
9 lines
263 B
C++
// pole kwadratu
|
|
int pole(int a) { return a * a; }
|
|
|
|
// pole prostokąta
|
|
int pole(int a, int b = 1) { return a * b; }
|
|
|
|
// kod jest problematyczny, ponieważ nazwy funkcji są niejasne: użytkownik nie ma
|
|
// łatwego sposobu, by zrozumieć co, która funkcja robi.
|