Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int a;
- double x, y;
- void podpunkt_3(double arg_1, double arg_2){
- double suma=arg_1+arg_2;
- cout<<suma<<endl;
- double roznica = arg_1 - arg_2;
- cout<<roznica<<endl;
- double iloczyn = arg_1 * arg_2;
- cout<<iloczyn<<endl;
- }
- int main() {
- cin>>a;
- cin>>x;
- cin>>y; //wczytanie zmiennych
- int nowa_1 = 2*a;
- bool nowa_2 = a>y;
- double nowa_3 = 2.5 * a; //podpunkt 1 - trzy nowe zmienne
- x*=2;
- cout<<x<<endl;
- x+=1;
- cout<<x<<endl;
- x*=x;
- cout<<x<<endl; //podpunkt 2 - dzialania na x
- podpunkt_3(x, y);
- podpunkt_3(5.0, x); //wywolanie funkcji podpunkt 3
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement