Tuesday, 3 February 2015

Kilobytes to Megabytes conversion in C++

Structure of the Problem Requirements 

This Program convert Kilobyte data into Megabyte. The General formula for this conversion is 1024 Kilobyte is equal one Megabyte.This program will take three input(kilobyte data) and then convert them into megabyte.

Source Code

#include<iostream>
using namespace std;
int main ()
{
double kilobyte,kilobyte1,kilobyte2;
int megabyte = 1024;
cout<<"\t \t \t LEP DATA CONVERTER \n \n";
cout<<"Enter the Kilobyte to Convert in Megabyte : ";
cin>>kilobyte;
cout<<"Enter the Kilobyte to Convert in Megabyte : ";
cin>>kilobyte1;
cout<<"Enter the Kilobyte to Convert in Megabyte : ";
cin>>kilobyte2;
cout<<endl<<endl;
cout<<"\t \t KiloBytes " <<"\t \t MegaBytes \n \n ";
cout<<"\t \t "<<kilobyte<<" \t \t \t "<<kilobyte/megabyte <<endl;
cout<<"\t \t "<<kilobyte1<<" \t \t \t "<<kilobyte1/megabyte<<endl;
cout<<"\t \t "<<kilobyte2<<" \t \t \t "<<kilobyte2/megabyte;
return 0;
}

Output of the Program

Kilobytes to Megabytes conversion in C++

Share it Please
asad

About Author!

Asad Niazi is Software Engineer , Programmer, Web Developers and a young mentor of Tech Solutions Desk and Blogging Solutions . Asad Love to writes about Technology, Programming, Blogging and make money online.

0 comments:

Post a Comment