PDA

View Full Version : Shadow Lord learns to Program!



Shadow Lord
2011-08-15, 06:03 PM
What? This totally isn't a blatant rip off of Thanqol! That would be rude, and uncalled for, too!

Anyway, I want to learn how to program. So I'm going to. Using Microsoft Visual C# 2010 Express, and this guide (http://davidevitelaru.com/tutorials/programming/Lesson%201%20-%20Introduction%20to%20Programming.pdf), I shall become a programming genius!

Now, every day when I finish a Lesson, I will post up a link to the completed version of the Lesson. This way, I'll have a log of actually understanding what I'm doing. I haven't finished lesson one though, so no link yet. But eventually! There! Shall! Be! A! LINK!!!!!!

super dark33
2011-08-15, 06:18 PM
if you want, there is a challenge for programmers here when you finish.

Shadow Lord
2011-08-15, 06:28 PM
And here is my first calculator! Woop! This is pretty fun!

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
int number1, number2;
Console.WriteLine("Please insert a number:");
number1 = Int32.Parse(Console.ReadLine());
Console.WriteLine("Please insert another number:");
number2 = Int32.Parse(Console.ReadLine());

int result;

result = number1 + number2;
Console.WriteLine("Sum: " + result.ToString());

result = number1 - number2;
Console.WriteLine("Subtraction: " + result.ToString());

result = number1 * number2;
Console.WriteLine("Multiplication: " + result.ToString());

result = number1 / number2;
Console.WriteLine("Division: " + result.ToString());

Console.ReadKey();
}
}
}

Domochevsky
2011-08-15, 07:00 PM
Mhm, you should bunch your int declarations together, to better keep track of them. Possibly also use hungarian declarations, if you feel like it. :smallsmile:

(Trick question: How much of the written code do you actually understand yet and how much is said to be "we'll get to that later, just write it now"? :smallbiggrin: )

Shadow Lord
2011-08-15, 07:03 PM
Mhm, you should bunch your int declarations together, to better keep track of them. Possibly also use hungarian declarations, if you feel like it. :smallsmile:

(Trick question: How much of the written code do you actually understand yet and how much is said to be "we'll get to that later, just write it now"? :smallbiggrin: )

I... kind of?... understand all of it. Sorta.