Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <algorithm>
- #include <cmath>
- #include <cstdlib>
- using namespace std;
- int main()
- {
- //1. Napisać program obliczania wartości wyrażenia
- //wdl wzoru F = (3*z + 2*x +1)/2;
- double a,b;
- int F;
- double k;
- int z = int(a);
- int x = int(b);
- cin>>z;
- cin>>x;
- F = (3*z + 2*x +1)/2;
- k = (3*a + 2*b + 1)/2;
- cout<<"wynik w intach "<<F<<endl;
- cout<<"wynik w double "<<k<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment