Learning by doing: Reading books and trying to understand the (code) examples
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

20 lines
373 B

#include <stdio.h>
#include <string.h>
int main (void) {
float speed;
float size;
printf("Give download speed in Mbit/s: ");
scanf("%f", &speed);
printf("Give file size in Mbytes: ");
scanf("%f", &size);
printf("At %.2f megaits per second, a file of %.2f megabytes\n", speed, size);
printf("downloads in %.2f seconds\n", size*8/speed);
return 0;
}