Ri'Me wrote:what kind of math do you need to know to learn all this? is it difficult math? I hate math
well your high school math teachers always seem to say you need calculus and such for programming, but you don't. There are "mathematical concepts" in programming. Such as IF dog = 9 then fruit = 17. dog and fruit being variables. if and then you may recognize as a "if then" statement that is in some math classes, but you dont really dont need to know much math.
The above example was bad, it makes programming look simple. So to show you it is infact not simple here is a section of code from my first C++ program:
switch(nVarible1)
{
case 1:
int nFahrenheit1;
cout << "\n1 for Fahrenheit to Celsius\n2 for Fahrenheit to Kelvin...";
cin >> nFahrenheit1;
if (nFahrenheit1 != 2)
{
double dFtoC;
cout << "\nWhat is the fahrenheit degrees you would like to convert to celsius?...";
cin >> dFtoC;
double answer1;
answer1 = (dFtoC - 32) * .5555555555555555555555555555555555555555555555555;
cout << "\nYour answer is:";
cout << answer1 << endl;
cout << "\n1 to continue or 0 to exit...";
cin >> nfinish;
}
else
{
double dFtoK;
cout << "\nWhat is the fahrenheit degrees you would like to convert to kelvin?...";
cin >> dFtoK;
double answer2;
double answer25;
answer2 = (dFtoK - 32) * .5555555555555555555555555555555555555555555555555;
answer25 = answer2 + 273;
cout << "\nYour answer is:";
cout << answer25 << endl;
cout << "\n1 to continue or 0 to exit...";
cin >> nfinish;
}
break;
case 2:
int nCelsius1;
cout << "\n1 for Celsius to Fahrenheit\n2 for Celsius to Kelvin...";
cin >> nCelsius1;
if (nCelsius1 != 2)
{
double dCtoF;
cout << "\nWhat is the celcius degrees you would like to convert to Fahrenheit?...";
cin >> dCtoF;
double answer3;
answer3 = dCtoF * 1.8 + 32;
cout << "\nYour answer is:";
cout << answer3 << endl;
cout << "\n1 to continue or 0 to exit...";
cin >> nfinish;
}
else
{
double dCtoK;
cout << "\nWhat is the Celsius degrees you would like to convert to kelvin?...";
cin >> dCtoK;
double answer4;
answer4 = dCtoK + 273;
cout << "\nYour answer is:";
cout << answer4 << endl;
cout << "\n1 to continue or 0 to exit...";
cin >> nfinish;
}
break;
case 3:
int nKelvin1;
cout << "\n1 for Kelvin to Fahrenheit\n2 for Kelvin to Celsius...";
cin >> nKelvin1;
if (nKelvin1 != 2)
{
double dKtoF;
cout << "\nWhat is the kelvin you would like to convert to Fahrenheit?...";
cin >> dKtoF;
double answer5;
double answer55;
answer5 = dKtoF - 273;
answer55 = answer5 * 1.8 + 32;
cout << "\nYour answer is:";
cout << answer55 << endl;
cout << "\n1 to continue or 0 to exit...";
cin >> nfinish;
}
else
{
double dKtoC;
cout << "\nWhat is the kelvin you would like to convert to celsius?...";
cin >> dKtoC;
double answer6;
answer6 = dKtoC - 273;
cout << "\nYour answer is:";
cout << answer6 << endl;
cout << "\n1 to continue or 0 to exit...";
cin >> nfinish;
}
break;
default:
cout << "\nYou didn't enter a 1, 2, or 3\n";
}
}