| | |
Byte to KILOBYTE conversion in c++
Please support our C++ advertiser: Intel Parallel Studio Home
HEy
Buddies in early morning i want to calculate that exchange during download & you very well known that it is shown in byte so just i am g with c++ and play a game for writing this.
thanks
enjoy it.
It's very easy and handy with simple logic.

Buddies in early morning i want to calculate that exchange during download & you very well known that it is shown in byte so just i am g with c++ and play a game for writing this.
thanks
enjoy it.
It's very easy and handy with simple logic.
#include <iostream> #include <cmath> using namespace std; int main() { long double byte; long double kilobyte; long double megabyte; long double gigabyte; cout << "Enter the byte value"; cin>>byte; kilobyte = byte / 1024; megabyte = kilobyte / 1024; gigabyte = megabyte / 1024; cout << byte << " Equal to " << kilobyte << " Kilobyte's "<<"\n"; cout << byte << " Equal to " << megabyte << " Megabyte's "<<"\n"; cout << byte << " Equal to " << gigabyte << " Gigabyte's "<<"\n"; system("pause"); return 0; }
1
•
•
•
•
Nice it only has two flaws.
Change the system("pause") to cin.get();
And put a while loop around it all so you can do it repeated times.
//K0s3rv
Change the system("pause") to cin.get();
And put a while loop around it all so you can do it repeated times.
//K0s3rv
Similar Threads
- Confusion in Function (C#)
- Conversion (VB.NET)
- OS Questions (IT Professionals' Lounge)
- object stream and byte array conversion (Java)
- Audio Conversion (VB.NET)
- byte and long conversion in VB (Visual Basic 4 / 5 / 6)
- suitability of .net for tcp/ip server (ASP.NET)
| Thread Tools | Search this Thread |
Tag cloud for C++
6 add api array arrays beginner binary c++ c/c++ calculator char class classes code compile compiler console conversion convert count data delete desktop directshow dll download dynamic encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelper iamthwee ifstream input int integer java lib library linkedlist linker linux loop looping loops map math matrix memory microsoft newbie news number output parameter pointer problem program programming project proxy python random read recursion recursive reference return string strings struct studio system template templates test text text-file tree unix url variable vector video visual visualstudio win32 windows winsock wordfrequency wxwidgets



