Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- using namespace std;
- int main()
- {
- double x, y, z;
- int w;
- cout << "Zakonczyc program?"<< endl;
- cout << "1- tak" << endl;
- cout << "2 - nie" << endl;
- cin >> w;
- if(w == 2)
- {
- exit(0);
- }
- else
- {
- cout << "Podaj dystans" << endl;
- cin >> x;
- cout << "Podaj ilosc spalonego paliwa" << endl;
- cin >> y;
- z = (y*100)/x;
- cout << "Sredna ilosc spalonego paliwa na 100 km wynosi: " << z << endl;
- cout << "Zakonczyc program t/n ?" << endl;
- cin >> w;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement