Question #299937

write a program that takes storage capacity in GB from user and convert it into MBs

Expert's answer

#include <iostream>
using namespace std;


int main() {
	 long mb, gb;
    
    // Asking for input
    cout<<"Enter the size in GB: ";
    cin>>gb;
    // GB to MB Conversion
    mb = gb * 1024;


    // Displaying output
    cout<<gb<<" Gigabytes = "<<mb<<" Megabytes\n\n";




	system("pause");


	return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS