#include <iostream>
using namespace std;
int meter_mill (int m)
{
int mill;
mill=m*1000;
return (mill);
}
int meter_cent (int a)
{
int cent;
cent=a*100;
return (cent);
}
double meter_kil (double a )
{
double kil;
kil=a*.001;
return (kil);
}
double meter_inc (double a)
{
double inc;
inc=a*39.37008;
return (inc);
}
double meter_feet (double a)
{
double feet;
feet=a*3.28084;
return (feet);
}
double meter_yard (double a)
{
double yard;
yard=a*1.09361;
return (yard);
}
double meter_mile (double a)
{
double mile;
mile=a*6.2;
return (mile);
}
double meter_naut_mile (double a)
{
double naut_mile;
naut_mile=a*5.4;
return (naut_mile);
}
int main ()
{
char choice;
double mm,cm,km,in,ft,yrd,m,nm;
double n;
cout<<"Choose a Unit of Measurement: \na-Meter-Millimeter \nb-Meter-Centimeter\nc-Meter-Kilometer\nd-Meter-Inches\ne-Meter-Feet\nf-Meter-Yard\nj-Meter-Mile\nk-Meter-Nautical Mile"<<endl;
cin>>choice;
switch (choice)
{
case 'a':
cout<<"Enter Number of Meter: ";
cin>>n;
mm = meter_mill (n);
cout << "The height in milimeter is "<<mm<<endl;
break;
case 'b':
cout<<"Enter Number of Meter: ";
cin>>n;
cm = meter_cent (n);
cout << "The height in centimeter is "<<cm<<endl;
break;
case 'c':
cout<<"Enter Number of Meter: ";
cin>>n;
km = meter_kil (n);
cout << "The height in Kilometer is "<<km<<endl;
break;
case 'd':
cout<<"Enter Number of Meter: ";
cin>>n;
in = meter_inc (n);
cout << "The height in Inches is "<<in<<endl;
break;
case 'e':
cout<<"Enter Number of Meter: ";
cin>>n;
ft = meter_feet (n);
cout << "The height in Feet is "<<ft<<endl;
break;
case 'f':
cout<<"Enter Number of Meter: ";
cin>>n;
yrd = meter_yard (n);
cout << "The height in Yard is "<<yrd<<endl;
break;
case 'j':
cout<<"Enter Number of Meter: ";
cin>>n;
m = meter_mile (n);
cout << "The height in Miles is "<<m<<endl;
break;
case 'k':
cout<<"Enter Number of Meter: ";
cin>>n;
nm = meter_naut_mile (n);
cout << "The height in Nautical Miles is "<<nm<<endl;
break;
default:
cout<<"Out of coverage"<<endl;
}
return 0;
}
Sample php program download, Sample C/C++ program download, Sample visual basic download
A blog to help students with their subject in programming.
Tuesday, March 13, 2012
Monday, March 12, 2012
C++: Compute for the Volume (Rectangular, Cone, Cylinder etc)
Sunday, February 26, 2012
Windows 7 - Apache in XAMPP wont start
Follow the screen shots. By the way I'm using Windows 7 Professional. In other Operating system just try to see its parallelism in terms of navigating the control panel. Just remember for the keywords in the screen shots. Like control panel, firewall, etc.
Here we go:
Here we go:
After doing all this procedure, restart your pc. After you restarted your apache should work well. See my screen shot after I have done the procedure.
Happy PHP coding. Any questions, dont hesitate to post in the comment section.
Saturday, February 18, 2012
Sample php program download, sample c/c++ program download, visual basic download, IDE basic troubleshooting
Hello guys, looking for a dynamic blog for you to ask questions on programming? You are on the right tract. Just begin a topic and I will try to resolve it. Im online 24/7.
For start with some C/C++ programming basics, you can see it here: Basic variable declaration, basic function programming. Just navigate on the archives.
You can also request for running sample program. Just post on a comment box. YOU DONT NEED TO PAY. I just want to help you guys who is like me once before.
Just email me for your program request.
nielsccian@gmail.com, nielsccian@yahoo.com, ronilo.yap@tvipacific.com.ph.
Just make a comment and ask questions.
For start with some C/C++ programming basics, you can see it here: Basic variable declaration, basic function programming. Just navigate on the archives.
You can also request for running sample program. Just post on a comment box. YOU DONT NEED TO PAY. I just want to help you guys who is like me once before.
Just email me for your program request.
nielsccian@gmail.com, nielsccian@yahoo.com, ronilo.yap@tvipacific.com.ph.
Just make a comment and ask questions.
Subscribe to:
Posts (Atom)