Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Programming
You last visited: Today at 18:51

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Programming for Idiots (C#) - Take 2

Discussion on Programming for Idiots (C#) - Take 2 within the CO2 Programming forum part of the Conquer Online 2 category.

Closed Thread
 
Old 06/30/2012, 23:29   #136
 
elite*gold: 0
Join Date: Aug 2006
Posts: 7
Received Thanks: 0
"getting started" file not found.... can u reupload please?
funkymonkey is offline  
Old 07/01/2012, 07:45   #137
 
elite*gold: 0
Join Date: Oct 2011
Posts: 9
Received Thanks: 4
Please reupload them [ Uint One] Lesson Three & Lesson Nine] [Uint Two] leasson One & two & six & Thanks :)
xMarline is offline  
Old 07/01/2012, 09:01   #138
 
Zeroxelli's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 1,769
Received Thanks: 1,143
Check
Zeroxelli is offline  
Old 07/03/2012, 07:59   #139
 
Silent-Death's Avatar
 
elite*gold: 0
Join Date: Jan 2006
Posts: 1,055
Received Thanks: 296
ROFL!

I`m actually having some fun with the 'homework' Inf is giving in these tuts.

Check this one out lol:

Quote:
A group of three people attempt to walk into a bar. They must show their ID which indicates their age before they enter. Your program will take the input of these three ages and tell them if they’re too young to enter (consider if a person is 18 or older they are allowed to enter).
Now thing is from that they I understood something like if one is over 18 he can be the supervisor for the other two so they can all enter. Didn`t understand why the need for the while since it`s the while lesson =))

This is inf's solution:
Code:
        static void Main(string[] args)
        {
            int j = 0;
            while (j < 3)
            {
                int age = int.Parse(Console.ReadLine());
                if (age >= 18)
                {
                    Console.WriteLine("Enjoy your stay");
                }
                else
                {
                    Console.WriteLine("Sorry kiddo. Too young.");
                }
		    j++;
            }
        }
this was mine:
Code:
static void Main(string[] args)
        {
            int a1 = int.Parse(Console.ReadLine());
            int a2 = int.Parse(Console.ReadLine());
            int a3 = int.Parse(Console.ReadLine());
            int i = 0;

            while (i < 1)
            {
                if (a1 >= 18)
                {
                    Console.WriteLine("You may enter . 1");
                }
                else if (a2 >= 18)
                {
                    Console.WriteLine("You may enter . 2");
                }
                else if (a3 >= 18)
                {
                     Console.WriteLine("You may enter . 3");
                }
                else
                {
                    Console.WriteLine("Go home kids..");
                }
                i++;
            }
            Console.ReadKey();
        }
Seriously, if you are new to c# and dunno where to start, check these lessons out. They are fun =)
Silent-Death is offline  
Old 07/03/2012, 08:21   #140
 
Zeroxelli's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 1,769
Received Thanks: 1,143
Quote:
Originally Posted by Silent-Death View Post
ROFL!

I`m actually having some fun with the 'homework' Inf is giving in these tuts.

Check this one out lol:



Now thing is from that they I understood something like if one is over 18 he can be the supervisor for the other two so they can all enter. Didn`t understand why the need for the while since it`s the while lesson =))

This is inf's solution:
Code:
        static void Main(string[] args)
        {
            int j = 0;
            while (j < 3)
            {
                int age = int.Parse(Console.ReadLine());
                if (age >= 18)
                {
                    Console.WriteLine("Enjoy your stay");
                }
                else
                {
                    Console.WriteLine("Sorry kiddo. Too young.");
                }
            j++;
            }
        }
this was mine:
Code:
static void Main(string[] args)
        {
            int a1 = int.Parse(Console.ReadLine());
            int a2 = int.Parse(Console.ReadLine());
            int a3 = int.Parse(Console.ReadLine());
            int i = 0;

            while (i < 1)
            {
                if (a1 >= 18)
                {
                    Console.WriteLine("You may enter . 1");
                }
                else if (a2 >= 18)
                {
                    Console.WriteLine("You may enter . 2");
                }
                else if (a3 >= 18)
                {
                     Console.WriteLine("You may enter . 3");
                }
                else
                {
                    Console.WriteLine("Go home kids..");
                }
                i++;
            }
            Console.ReadKey();
        }
Seriously, if you are new to c# and dunno where to start, check these lessons out. They are fun =)
Hmm.. well, you get the three input values without actually asking them, so they have to KNOW to enter a number three different times before seeing any output. Also, you don't need a while if you're going to only do something once, it's a waste of machine code Here's a C++ example (Could use while, but meh.)

Code:
#include <iostream>
#include <stdlib.h>

typedef unsigned char byte;

int main(int argc, char* argv[])
{
    byte Age = 0;
    std::string _age;
    for (byte b = 0; b < 3; b++)
    {
        std::cout << (Age == 0 ? "Hey kid, how old are you?: " : "What about you, how old are you?: ");
        std::cin >> _age;
        Age = atoi(_age.c_str());
        if (Age >= 18)
            std::cout << "Okay kid, go ahead." << std::endl;
        else
            std::cout << "Sorry kid, go home." << std::endl;
    }
    return 0;
}
Zeroxelli is offline  
Old 07/03/2012, 08:51   #141
 
Silent-Death's Avatar
 
elite*gold: 0
Join Date: Jan 2006
Posts: 1,055
Received Thanks: 296
Quote:
Originally Posted by Zeroxelli View Post
Hmm.. well, you get the three input values without actually asking them, so they have to KNOW to enter a number three different times before seeing any output. Also, you don't need a while if you're going to only do something once, it's a waste of machine code Here's a C++ example (Could use while, but meh.)

Code:
#include <iostream>
#include <stdlib.h>

typedef unsigned char byte;

int main(int argc, char* argv[])
{
    byte Age = 0;
    std::string _age;
    for (byte b = 0; b < 3; b++)
    {
        std::cout << (Age == 0 ? "Hey kid, how old are you?: " : "What about you, how old are you?: ");
        std::cin >> _age;
        Age = atoi(_age.c_str());
        if (Age >= 18)
            std::cout << "Okay kid, go ahead." << std::endl;
        else
            std::cout << "Sorry kid, go home." << std::endl;
    }
    return 0;
}
aye i know lol.. that is why i was wondering about why implementing while but it was the lesson about while so i just put one in =)

ffs =))
Code:
whie (a < 1)
{
a++
}
who the hell does that =)) that`s why i posted it, for the lols )
Silent-Death is offline  
Old 07/03/2012, 17:34   #142
 
Zeroxelli's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 1,769
Received Thanks: 1,143
Quote:
Originally Posted by Silent-Death View Post
aye i know lol.. that is why i was wondering about why implementing while but it was the lesson about while so i just put one in =)

ffs =))
Code:
whie (a < 1)
{
a++
}
who the hell does that =)) that`s why i posted it, for the lols )
I guess it does prove a point, that while loops can be used the same way, I don't use them that often, though.
Zeroxelli is offline  
Old 07/03/2012, 18:03   #143
 
Silent-Death's Avatar
 
elite*gold: 0
Join Date: Jan 2006
Posts: 1,055
Received Thanks: 296
yea i work with for's too.
Silent-Death is offline  
Old 02/05/2013, 00:34   #144
 
elite*gold: 0
Join Date: Jun 2010
Posts: 5
Received Thanks: 0
can you update the links?.....nd sure unit 2 Lesson 2 one....?!
spearking is offline  
Old 07/02/2013, 23:15   #145
 
kiko8koki's Avatar
 
elite*gold: 0
Join Date: Jun 2009
Posts: 68
Received Thanks: 28
All the links aren't working.
kiko8koki is offline  
Old 10/16/2013, 02:06   #146
 
elite*gold: 0
Join Date: May 2008
Posts: 164
Received Thanks: 16
I think need someone to re-upload all the files again for those who really want to learn it.
skykaiwen is offline  
Old 10/16/2013, 06:52   #147
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,283
Received Thanks: 4,191
Closed until notice is given from the original poster. The links have been dead for months now, and we really don't need this to be bumped every few months or so.
Spirited is offline  
Closed Thread


Similar Threads Similar Threads
Programming For Idiots (Tutorial) - In C#
05/25/2013 - CO2 Programming - 188 Replies
This tutorial has been superseded by: http://www.elitepvpers.com/forum/co2-programming/88 5939-programming-idiots-c-take-2-a.html Well for the next week (or so) due to being bored, I've started a video-tutorial called C# Programming for Idiots and yeah, by the end of it I'll demonstrate how to make a conquer server (patch 5016 and before) without the need of mysql, or anything like that; all you need is the Visual C# compiler, and WinRAR (To extract the videos). Visual C# Compiler:...
Programming for Idiots (Tutorial) C++
06/11/2012 - CO2 Programming - 20 Replies
Yeah, so in my relation to my C# one (http://www.elitepvpers.com/forum/co2-guides-templa tes/148675-programming-idiots-tutorial-c.html), which wasn't the best I felt I'll *try* make for it with this one. I've also got some spare time in between school, from when exams start, and a new Warlords server comes out... so yeah. Right, so before I post any links to the videos I'd like to point out, so I don't get bitched at by people saying, "this isn't real C++", most of the things I do will be...
[RE-OPENING]"Programming For Idiots (Tutorial) - In C#"
09/17/2009 - CO2 Programming - 20 Replies
At start i want to say THIS IS NOT MY GUIDE , GUIDE WAS MADE BY INFAMOUSNONE!!



All times are GMT +1. The time now is 18:52.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.