Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- using namespace std;
- void f1() {
- double a, b, w;
- cout << "---- FUNKCJA 1 ----" << endl;
- cout << "Podaj liczbe nr 1: ";
- cin >> a;
- cout << "Podaj liczbe nr 2: ";
- cin >> b;
- w = pow(a, 2) + pow(b, 2);
- cout << "Wynik: " << w << endl << endl;
- }
- void f2() {
- double a, b, w;
- cout << "---- FUNKCJA 2 ----" << endl;
- cout << "Podaj liczbe nr 1: ";
- cin >> a;
- cout << "Podaj liczbe nr 2: ";
- cin >> b;
- w = pow(a, 2) - pow(b, 2);
- cout << "Wynik: " << w << endl << endl;
- }
- int main()
- {
- f1();
- f2();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement