Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[C#]First Console App

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    Cheat Engine Forum Index -> General programming -> Binaries
View previous topic :: View next topic  
Author Message
Trucido
Moderator
Reputation: 6

Joined: 08 Sep 2007
Posts: 2792

PostPosted: Mon Jul 07, 2008 12:19 am    Post subject: [C#]First Console App Reply with quote

Basic Console App.
You enter a name, press enter and it tells you how long their penis is.
=P
(It generates a random number 0-100)
Thanks to Holland and Jonyleeson for helping me work out the kinks.
(And improve my code)

Heres the source, Just in case any other beginners are curious.
Code:
//Trucido's C# Penis Length Generator!
//Thanks to Holland - For fixing the loop function
//Katana - For trying =]
//Jonyleeson - For being awsome, fixing name error, and improving code.
using System;

namespace ConsoleAppTemplate
{
    public class Program
    {
        static void Main(string[] args)
        {
            System.Random RandNum = new System.Random();
            {
                Console.ForegroundColor = ConsoleColor.Blue;
                {
                    Console.Write("Enter your name, to see the exact measurments of your penis. Name:");
                    {
                        int n = 4;
                        do
                        {
                            string sName = Console.ReadLine();
                            if (sName == "Trucido")
                            {
                                Console.WriteLine("Trucido's penis cannot be measured by this simple console app");
                            }
                            else
                            {
                                Console.WriteLine("Lulz," + sName + " your penis is " + RandNum.Next(100) + " cm Long ");
                            }
                            Console.WriteLine("Enter another Name and Press Enter");
                        } while (n < 10);
                    }
                }
            }
        }
    }
}



The Extension 'rar' was deactivated by an board admin, therefore this Attachment is not displayed.


_________________
I'm out.
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Mon Jul 07, 2008 2:40 am    Post subject: Reply with quote

what is with the nine hundred brackets?
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 198

Joined: 25 Jan 2006
Posts: 8516
Location: 127.0.0.1

PostPosted: Mon Jul 07, 2008 2:49 am    Post subject: Reply with quote

Every single program you make in your life time should not end up in this section.
_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
AndrewMan
Grandmaster Cheater Supreme
Reputation: 0

Joined: 01 Aug 2007
Posts: 1257

PostPosted: Mon Jul 07, 2008 4:18 pm    Post subject: Reply with quote

Wiccaan wrote:
Every single program you make in your life time should not end up in this section.


This is true.

I would just release stuff you are proud of. Not something you tried out and it worked.

But nice job, this app is funny Very Happy

_________________
Back to top
View user's profile Send private message
NINTENDO
Grandmaster Cheater Supreme
Reputation: 0

Joined: 02 Nov 2007
Posts: 1371

PostPosted: Fri Jan 23, 2009 10:24 am    Post subject: Reply with quote

Why are you writeing System.Random when your using the System namespace?

Code:
using System;
namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {

            Random rand = new Random();
            Console.ForegroundColor = ConsoleColor.Blue;
           
            while (true)
            {
                Console.Write("Enter your name, to see the exact measurments of your penis. Name:");
                String sname = Console.ReadLine();
                if (sname.Length<=0 || sname =="exit")
                {
                    break;
                }
                else if(sname=="Trucido")
                {
                    Console.WriteLine("Trucido's penis cannot be measured by this simple console app");
                }
                else
                {
                    Console.WriteLine("Lulz, " + sname + ", your penis is " + rnd(100) + " cm long");
                }
               
             
            }
        }
        static int rnd(int i)
        {
            return new Random().Next(i);
        }
       
    }
}

_________________
Intel over amd yes.
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
nwongfeiying
Grandmaster Cheater
Reputation: 2

Joined: 25 Jun 2007
Posts: 695

PostPosted: Fri Jan 23, 2009 11:44 pm    Post subject: Reply with quote

You has been trolled by slovach and Wiccan.
Back to top
View user's profile Send private message
hacksign23
Master Cheater
Reputation: 0

Joined: 26 Nov 2006
Posts: 404

PostPosted: Thu Jan 29, 2009 3:28 pm    Post subject: Reply with quote

C#.NET**

btw, is there something similar to system's functions for regular C++?

_________________
Back to top
View user's profile Send private message AIM Address
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Thu Jan 29, 2009 4:45 pm    Post subject: Reply with quote

hacksign23 wrote:
C#.NET**

btw, is there something similar to system's functions for regular C++?


1. It is just C#, don't append a .NET to it, it's wrong.

2. Obviously

3. Why does this keep getting bumped.
Back to top
View user's profile Send private message
S3NSA
:3
Reputation: 1

Joined: 06 Dec 2006
Posts: 1908
Location: England.

PostPosted: Fri Jan 30, 2009 10:51 am    Post subject: Reply with quote

nwongfeiying wrote:
You has been trolled by slovach and Wiccan.

Suggest you learn the definition of "trolling".

_________________
~ You can find me on irc.ccplz.net x
Back to top
View user's profile Send private message Visit poster's website
nwongfeiying
Grandmaster Cheater
Reputation: 2

Joined: 25 Jun 2007
Posts: 695

PostPosted: Sun Feb 01, 2009 12:48 am    Post subject: Reply with quote

S3NSA wrote:
nwongfeiying wrote:
You has been trolled by slovach and Wiccan.

Suggest you learn the definition of "trolling".


It means to cause anger to the poster; you need to lurk moar.
Back to top
View user's profile Send private message
LolSalad
Grandmaster Cheater
Reputation: 1

Joined: 26 Aug 2007
Posts: 988
Location: Australia

PostPosted: Sun Feb 01, 2009 12:56 am    Post subject: Reply with quote

nwongfeiying wrote:
S3NSA wrote:
nwongfeiying wrote:
You has been trolled by slovach and Wiccan.

Suggest you learn the definition of "trolling".


It means to cause anger to the poster; you need to lurk moar.


http://en.wikipedia.org/wiki/Troll_(Internet)

No, it means to provoke them into giving an amusing response; you need to lurk moar.

Also, this topic should probably be locked. Neutral

_________________
Back to top
View user's profile Send private message MSN Messenger
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Sun Feb 01, 2009 2:00 am    Post subject: Reply with quote

LolSalad wrote:
Also, this topic should probably be locked. Neutral


Great idea.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   This topic is locked: you cannot edit posts or make replies.    Cheat Engine Forum Index -> General programming -> Binaries All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites