Answer to Question #299937 in C++ for ali

Question #299937

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

1
Expert's answer
2022-02-19T16:56:27-0500
#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!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog