Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- void venLike(int obsht,int p,int h,int t,int th , int pt , int hp)
- {
- int tempt = t - th;
- int temph = h - th;
- int ptItIh = tempt + temph + th;
- int ostatuk = obsht - ptItIh;
- hp = p - ostatuk;
- cout << "HP = " << hp;
- }
- int main()
- {
- //zadacha tip ven oiler 2
- //
- int obsh, p, h, t, th, pt, hp; //tursi se HP
- pt = 0;
- hp = 0;
- cout << " vuvedete obsht broi,P,H,T,TH" << endl;
- cin >> obsh >> p >> h >> t >> th;
- cout << "Obshto = " << obsh << ", P = " << p << ", T = " << t << ", TH = " << th << ", Pt = " << pt << endl;
- cout << "Namirane na HP" << endl;
- venLike(obsh, p, h, t, th, pt, hp);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement