Advertisement
Narzew

Szybkosc neta

Oct 10th, 2013
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.58 KB | None | 0 0
  1. #include <cstdlib>
  2. #include <iostream>
  3.  
  4. using namespace std;
  5.  
  6. int main(){
  7.     double szybkosc,downloadspeed,dane,danemb;
  8.     unsigned int czas;
  9.     cout<<"Analizator transferu by Narzew\n09.10.2013\n";
  10.     cout<<"Podaj szybkosc lacza (Mbps): ";
  11.     cin >> szybkosc;
  12.     cout <<"Podaj czas (minuty): ";
  13.     cin >> czas;
  14.     // KB per second
  15.     downloadspeed = (szybkosc*1024) / 8;
  16.     dane = downloadspeed*60*czas;
  17.     danemb = dane/1024;
  18.     cout<<"Maksymalna szybkosc: "<<downloadspeed<<" KB\\s\n";
  19.     cout<<"Dane: "<<dane<<" KB ("<<danemb<<" MB)\n";
  20.     cout<<"Dziekuje za uzycie programu.\n";
  21.     return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement