Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <math.h>
- #include <conio.h>
- using namespace std;
- string plec, trunek;
- float moc, ml, alkohol, etyl, gestosc, plyny, ustrojowe, waga;
- int main()
- {
- cout << "Hello world" << endl;
- cout << "Podaj plec: ";
- cin >> plec;
- cout << "Podaj swoja wage: ";
- cin >> waga;
- cout << "Jaki trunek spozywales: ";
- cin >> trunek;
- cout << "Ile jego wypiles: ";
- cin >> ml;
- cout << "Ile procent mial ten trunek: ";
- cin >> moc;
- if (plec=="Mezczyzna")
- {
- double ustrojowe = 0.7;
- }
- else if (plec=="Kobieta")
- {
- double ustrojowe = 0.6;
- }
- alkohol = ml*(moc/100);
- cout << alkohol << endl;
- double gestosc=0.79;
- etyl = alkohol*gestosc;
- cout << etyl;
- double plyny = ustrojowe*waga;
- cout << plyny;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement