Advertisement
dzieciol

srednie zuzycie paliwa

Sep 29th, 2014
424
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.42 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. /* run this program using the console pauser or add your own getch, system("pause") or input loop */
  4.  
  5. int main(int argc, char** argv) {
  6.     float a,b,c  ;
  7.     cout<<"podaj ilość kilometrów"<<endl;
  8.     cin>>a;
  9.     cout<<"podaj ilość zużytego paliwa"<<endl;
  10.     cin>>b;
  11.     c=b/a;
  12.     cout<<"twoje średnie zużuecie to "<<c<<" l/km"<<endl;
  13.     system("pause");
  14.     return 0;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement