Take computer file size in GB and display the size in bytes.
/* (1GB=1024 MB, 1MB=1024 KB, 1KB=1024 bytes) */ #includeint main() { int fileSizeInGb=0; int bytes=0; printf("Enter fileSizeInGb :"); scanf("%d", &fileSizeInGb); bytes=fileSizeInGb*1024*1024*1024; printf("%d Gb in bytes=%d\n",fileSizeInGb,bytes); return 0; }
No comments:
Post a Comment