Tuesday 3 February 2015

Bytes to kilobytes Conversion in C++

Structure of the Problem Requirements 

Bytes and Kilobytes are the units of data and we measure data in such types of units. These terms and data unit frequently used in computer science , software engineering and in IT departments. In this program we just convert bytes into kilobytes. The simple formula to calculate it is 1 kilobyte is equal to 1024 bytes.

Source Code

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

Output of the Program

Bytes to kilobytes 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