Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- #include <cstdlib>
- #include <string>
- #include <fstream>
- using namespace std;
- void drzewko(int &a, int &b, int &P)
- {
- P = a*b*2;
- }
- int drzewko2(int &a, int &b, int &P)
- {
- P = a*b*3;
- return P;
- }
- int main()
- {
- cout<<"no hej podaj liczbe: "<<endl;
- int a,b,P=0;
- cin>>a>>b;
- P = a*b;
- cout<<"twe pole to: "<<P<<endl;
- drzewko(a,b,P);
- cout<<"twe 2 * pole teraz to: "<<P<<endl;
- drzewko2(a,b,P);
- cout<<"twe 3 * pole teraz to: "<<P<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment