Advertisement
Narzew

Szybkosc neta - C version

Oct 10th, 2013
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.67 KB | None | 0 0
  1. #include <stdlib.h>
  2. #include <stdio.h>
  3.  
  4. int main(){
  5.     float szybkosc;
  6.     unsigned int czas,downloadspeed,dane,danemb;
  7.     printf("%s","Analizator transferu by Narzew\n09.10.2013\n");
  8.     printf("%s","Podaj szybkosc lacza (Mbps): ");
  9.     scanf("%f",&szybkosc);
  10.     printf("%s","Podaj czas (minuty): ");
  11.     scanf("%d",&czas);
  12.     downloadspeed = (szybkosc*1024)/8;
  13.     dane = downloadspeed*60*czas;
  14.     danemb = dane/1024;
  15.     printf("%s","Maksymalna szybkosc: ");
  16.     printf("%d",downloadspeed);
  17.     printf("%s"," KB\\s\n");
  18.     printf( "%s","Dane: ");
  19.     printf("%d",dane);
  20.     printf("%s"," KB (");
  21.     printf("%d",danemb);
  22.     printf("%s"," MB)\n");
  23.     printf("%s","Dziekuje za uzycie programu.\n");
  24.     return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement