Returning to Shape

At the moment writing this, I recently began my first game programming course. The first week of the course has passed by really fast and was over before I knew it. So far it has been an easy time giving me a chance to remember what I learnt before I began here. Over all quite a relaxing start that helped me ease into coding again

That said, the tempo is quite high, and had I not known most of what was taught this week before I got here it would likely been a challenge. If the current pace keeps up I expect there will be things new to me already next week. But with all that said, I look forwards to the coming weeks, if for nothing else then for the new knowledge that will be gained.

/Stefan Ekdahl

PS.

Below I have included my code for a Celsius – Fahrenheit converter, that works both ways:

#include

using namespace std;

int main(int argc, char* argv[])
{
short Choice;
float Fahrenheit;
float Celsius;

cout << ”Please choose!nWrite 1 for Fahrenheit to Celsius!nWrite 2 for Celsius to Fahrenheit!n”;
cin >> Choice;

if (Choice == 1)
{
cout << ”Please input Fahrenheit: ”;
cin >> Fahrenheit;
Celsius = (Fahrenheit – 32) / 1.8;
cout << Celsius << ” Degrees Celsius!”;
std::cin.ignore(1024, ‘n’);
std::cin.get();
}
else if (Choice == 2)
{
cout << ”Please input Celsius: ”;
cin >> Celsius;
Fahrenheit = (Celsius * 1.8) + 32;
cout << Fahrenheit << ” Degrees Fahrenheit!”;
std::cin.ignore(1024, ‘n’);
std::cin.get();
}
}

About Stefan Ekdahl

2014  Programming