C > Code Snippets
Convert MB to KB
Convert MB to KB #include
int main(void) { double megabytes , kilobytes; printf("Please enter the amount of megabytes to convert.\n"); scanf("%Lf",&megabytes); /*convert megabytes to kilobytes*/ kilobytes = megabytes * 1024; /*convert kilobytes to megabytes*/ /*this is for kilobytes to megabytes*/ /*megabytes = kilobytes / 1024*/ printf("There are %Lf kilobytes in %Lf megabytes.\n",kilobytes,megabytes); return 0; }
C Codes
Beginners
C on Unix
Code Snippets
Data Structures
File Operations
Games Graphics
Gnu-Linux
Hardware
Mathematics
Miscellaneous
Small Programs
Sorting