complete assignment01

This commit is contained in:
SowinskiBraeden committed 2025-09-20 16:19:53 -07:00
1 parent 3b82537781
commit 964dd99acf
5 files changed
+187

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
#include <stdio.h>
#define MEGABYTES_TO_MEGABITS 8
int main(void) {
float downloadSpeedMbs;
float fileSizeMB;
float downloadTimeSeconds;
printf("Enter download speed (Mbs): ");
scanf("%f", &downloadSpeedMbs);
printf("Enter file size (MB): ");
scanf("%f", &fileSizeMB);
downloadTimeSeconds = (fileSizeMB * MEGABYTES_TO_MEGABITS) / downloadSpeedMbs;
printf(
"At %.2f megabits per second, a file of %.2f megabytes downloads in %.2f seconds.\n",
downloadSpeedMbs,
fileSizeMB,
downloadTimeSeconds
);
return 0;
}