Energy – mass Converter program c++ (cpp) source

This is a Simple C++ code for a converter program that converts energy into mass according to the famous equation from greatest scientist Albert Einstein. E= MC2
Input energy in MeV( Mega electron volt), GeV( Giga electron volt) or in  Tev( Tera electron volt).
You can use visual c++ compiler for compiling and running program. You can find the Source code below. if you are using Borland turbo C++ don’t use “using namespace std;” and insert .h extension for iostream, iomanip header files. Moreover, it will not support  “system(“CLS”);” and replace it by “clrscr();”
 
E= MC2: –
E = Energy
M = Mass
C = speed of light in vacuum (299792458 m/s)
Let’s imagine the practical use of this equation. Consider just a stone, which weigh 250g. If you convert it completely into energy, then the total energy from the mass;
E = 0.250(kg) x 89875517873681764 (c x c)
   = 22468879468420441 J
#include<iostream>
#include<Windows.h>//for_sleep()
#include<iomanip>
#include<process.h>  //for_exit()_function;
#include<conio.h>
    using namespacestd; 
void main()
{   system(“color f1”);   //making_colour_combinations
       double consteV=1.60219e-19;
       double constc2=9*10e16;   //c^2;
       int ch;   //for_input
       double e, mass;
       start:    //For_returning_into_main_menu
    system(“CLS”);
       cout<<“tt***********************************************n”;
       cout<<“tt   ENERGY – MASS CONVERTER : UNIT CHOICE MENUn”;
       cout<<“tt***********************************************n”;
       cout<<“nn 1. MeV (Mega Electrone Volts)n 2. GeV (Giga electrone volts)n 3. TeV (Tera Electrone Volts) n 4. Exit”;
       cout<<“nn Please Enter Your Choice :”;
       cin>>ch;
       system(“CLS”);    //Clear_screen_command
       switch(ch)
        {
              case 1:
                         cout<<“ntt     ENERGY-MASS CONVERTER ( E = mc^2 )”;
                         cout<<“nnnnPlease enter energy in MeV :”;
                         cin>>e;
                         e=e*10e6*eV;          // Energy Converted into Joules
                         mass=e/c2;
                         cout<<“nnntttMass = “<<setprecision(10)<<mass<<” Kilograms”;
                             break;
              case 2:
                        cout<<“tttENERGY-MASS CONVERTER ( E = mc^2 )”;
                        cout<<“nnnnPlease enter energy in GeV :”;
                        cin>>e;
                        e=e*10e9*eV;          // Energy Converted into Joules
                        mass=e/c2;
                        cout<<“nnntttMass = “<<setprecision(10)<<mass<<” Kilograms”;
                             break;
              case 3:
                         cout<<“tttENERGY-MASS CONVERTER ( E = mc^2 )”;
                         cout<<“nnnnPlease enter energy in TeV :”;
                         cin>>e;
                         e=e*10e12*eV;          // Energy Converted into Joules
                         mass=e/c2;
                         cout<<“nnntttMass = “<<setprecision(10)<<mass<<” Kilograms”;
                             break;
              case 4 : system(“CLS”);
                          cout<<“nnttttThank you………..”;
                            Sleep(1000);
                            exit(0);
              default: cout<<“naInvalid Choice !….nnPlease Try again.”;
                                  break;
        }                                              // End of switch
       if(_getch())       //wait_for_any_input_through_keyboard
         goto start;
return;
}
____________________________________________________________

Comments

53 responses to “Energy – mass Converter program c++ (cpp) source”

  1. … [Trackback]

    […] Find More on on that Topic: genuinecoder.com/energy-mass-converter-program-c-cpp-html/ […]

  2. … [Trackback]

    […] Find More here on that Topic: genuinecoder.com/energy-mass-converter-program-c-cpp-html/ […]

  3. … [Trackback]

    […] Find More Info here to that Topic: genuinecoder.com/energy-mass-converter-program-c-cpp-html/ […]

  4. … [Trackback]

    […] Information to that Topic: genuinecoder.com/energy-mass-converter-program-c-cpp-html/ […]

  5. … [Trackback]

    […] Read More Information here to that Topic: genuinecoder.com/energy-mass-converter-program-c-cpp-html/ […]

  6. … [Trackback]

    […] Info to that Topic: genuinecoder.com/energy-mass-converter-program-c-cpp-html/ […]

  7. … [Trackback]

    […] Info to that Topic: genuinecoder.com/energy-mass-converter-program-c-cpp-html/ […]

  8. … [Trackback]

    […] Information to that Topic: genuinecoder.com/energy-mass-converter-program-c-cpp-html/ […]

  9. … [Trackback]

    […] Find More Information here to that Topic: genuinecoder.com/energy-mass-converter-program-c-cpp-html/ […]

  10. … [Trackback]

    […] There you can find 73970 additional Info to that Topic: genuinecoder.com/energy-mass-converter-program-c-cpp-html/ […]

  11. … [Trackback]

    […] Find More on to that Topic: genuinecoder.com/energy-mass-converter-program-c-cpp-html/ […]

  12. … [Trackback]

    […] Read More on to that Topic: genuinecoder.com/energy-mass-converter-program-c-cpp-html/ […]

  13. … [Trackback]

    […] Here you will find 59495 additional Info to that Topic: genuinecoder.com/energy-mass-converter-program-c-cpp-html/ […]

  14. … [Trackback]

    […] Find More to that Topic: genuinecoder.com/energy-mass-converter-program-c-cpp-html/ […]

  15. … [Trackback]

    […] Find More on on that Topic: genuinecoder.com/energy-mass-converter-program-c-cpp-html/ […]

  16. … [Trackback]

    […] Read More here on that Topic: genuinecoder.com/energy-mass-converter-program-c-cpp-html/ […]

  17. … [Trackback]

    […] There you will find 19540 additional Info on that Topic: genuinecoder.com/energy-mass-converter-program-c-cpp-html/ […]

  18. … [Trackback]

    […] Read More Info here on that Topic: genuinecoder.com/energy-mass-converter-program-c-cpp-html/ […]

  19. … [Trackback]

    […] Read More to that Topic: genuinecoder.com/energy-mass-converter-program-c-cpp-html/ […]

  20. … [Trackback]

    […] Here you will find 45957 more Information to that Topic: genuinecoder.com/energy-mass-converter-program-c-cpp-html/ […]

  21. … [Trackback]

    […] Information to that Topic: genuinecoder.com/energy-mass-converter-program-c-cpp-html/ […]

  22. … [Trackback]

    […] Read More Info here to that Topic: genuinecoder.com/energy-mass-converter-program-c-cpp-html/ […]

  23. … [Trackback]

    […] Read More on that Topic: genuinecoder.com/energy-mass-converter-program-c-cpp-html/ […]

  24. … [Trackback]

    […] Read More to that Topic: genuinecoder.com/energy-mass-converter-program-c-cpp-html/ […]

  25. … [Trackback]

    […] Read More on to that Topic: genuinecoder.com/energy-mass-converter-program-c-cpp-html/ […]

  26. … [Trackback]

    […] Find More on to that Topic: genuinecoder.com/energy-mass-converter-program-c-cpp-html/ […]

  27. … [Trackback]

    […] Read More on that Topic: genuinecoder.com/energy-mass-converter-program-c-cpp-html/ […]

  28. … [Trackback]

    […] Find More here to that Topic: genuinecoder.com/energy-mass-converter-program-c-cpp-html/ […]

  29. … [Trackback]

    […] Find More Information here on that Topic: genuinecoder.com/energy-mass-converter-program-c-cpp-html/ […]

  30. … [Trackback]

    […] Info on that Topic: genuinecoder.com/energy-mass-converter-program-c-cpp-html/ […]

  31. … [Trackback]

    […] Here you will find 80403 more Info to that Topic: genuinecoder.com/energy-mass-converter-program-c-cpp-html/ […]

  32. … [Trackback]

    […] Read More on that Topic: genuinecoder.com/energy-mass-converter-program-c-cpp-html/ […]

  33. … [Trackback]

    […] Here you can find 14794 additional Information to that Topic: genuinecoder.com/energy-mass-converter-program-c-cpp-html/ […]

  34. … [Trackback]

    […] Find More Info here on that Topic: genuinecoder.com/energy-mass-converter-program-c-cpp-html/ […]

  35. … [Trackback]

    […] Find More to that Topic: genuinecoder.com/energy-mass-converter-program-c-cpp-html/ […]

  36. … [Trackback]

    […] There you can find 1029 more Info on that Topic: genuinecoder.com/energy-mass-converter-program-c-cpp-html/ […]

  37. … [Trackback]

    […] Find More on that Topic: genuinecoder.com/energy-mass-converter-program-c-cpp-html/ […]

  38. … [Trackback]

    […] Info to that Topic: genuinecoder.com/energy-mass-converter-program-c-cpp-html/ […]

  39. … [Trackback]

    […] Read More Information here to that Topic: genuinecoder.com/energy-mass-converter-program-c-cpp-html/ […]

  40. get enclomiphene mastercard buy

    get enclomiphene without recipe

  41. livraison le lendemain kamagra pas cher

    livraison sans ordonnance le lendemain kamagra

  42. get androxal generic australia

    get androxal generic drug

  43. buying dutasteride cheap discount

    dutasteride sales in US

  44. flexeril cyclobenzaprine online consultation overnight

    how to buy flexeril cyclobenzaprine generic canadian

  45. order gabapentin uk in store

    how to order gabapentin generic dosage

  46. online order fildena purchase online from india

    fildena online next day

  47. buy cheap itraconazole cheap info

    discount itraconazole cheap genuine

  48. cheapest buy staxyn generic mexico

    discount staxyn usa suppliers

  49. buying avodart generic uk next day delivery

    purchase avodart generic does it work

  50. cheapest rifaximin prices

    BUY rifaximin COD

  51. xifaxan online order no prescription

    ordering xifaxan usa overnight delivery

Leave a Reply