Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

program help

Name: mike redwood 2007-11-06 1:23

hey everyone
i just got virtual c# 2005 from microsoft's site and i want to use my old programs in it
i patsed the code in but it just gave me a bunch of errors
i asked a friend about it and he said this place was good for programming help

here's the code:
<CODE>
Module Module1

    Sub Main()

        Dim Average As Integer ' Holds the Average of the two numbers
        Dim Number1 As Integer ' Holds the first number
        Dim Number2 As Integer ' Holds the second number
        Dim Temporary As Integer ' Holds the number in between calculations

NumberOne:
        Console.WriteLine("Please Enter number one:")
        Temporary = Console.ReadLine()
        If Temporary = 0 Then GoTo NumberOne
        Number1 = Temporary
        Temporary = 0

NumberTwo:
        Console.WriteLine("Please Enter numbr two:")
        Temporary = Console.ReadLine()
        If Temporary = 0 Then GoTo NumberTwo
        Number2 = Temporary
        Temporary = 0

        Average = Average + Number1
        Average = Average + Number2
        Average = Average / 2

        Console.WriteLine("The Average of" & Number1 & "and" & Number2 & "is:")
        Console.WriteLine(Average)
        Console.ReadLine()

    End Sub

End Module
</CODE>

and here's the errors:
<CODE>Error    1    Newline in constant    C:\Documents and Settings\Mike\Local Settings\Application Data\Temporary Projects\ConsoleApplication1\Program.cs    5    32    ConsoleApplication1
Error    2    Too many characters in character literal    C:\Documents and Settings\Mike\Local Settings\Application Data\Temporary Projects\ConsoleApplication1\Program.cs    5    32    ConsoleApplication1
Error    3    Newline in constant    C:\Documents and Settings\Mike\Local Settings\Application Data\Temporary Projects\ConsoleApplication1\Program.cs    6    32    ConsoleApplication1
Error    4    Too many characters in character literal    C:\Documents and Settings\Mike\Local Settings\Application Data\Temporary Projects\ConsoleApplication1\Program.cs    6    32    ConsoleApplication1
Error    5    Newline in constant    C:\Documents and Settings\Mike\Local Settings\Application Data\Temporary Projects\ConsoleApplication1\Program.cs    7    32    ConsoleApplication1
Error    6    Too many characters in character literal    C:\Documents and Settings\Mike\Local Settings\Application Data\Temporary Projects\ConsoleApplication1\Program.cs    7    32    ConsoleApplication1
Error    7    Newline in constant    C:\Documents and Settings\Mike\Local Settings\Application Data\Temporary Projects\ConsoleApplication1\Program.cs    8    34    ConsoleApplication1
Error    8    Too many characters in character literal    C:\Documents and Settings\Mike\Local Settings\Application Data\Temporary Projects\ConsoleApplication1\Program.cs    8    34    ConsoleApplication1
Error    9    A namespace does not directly contain members such as fields or methods    C:\Documents and Settings\Mike\Local Settings\Application Data\Temporary Projects\ConsoleApplication1\Program.cs    1    1    ConsoleApplication1
</CODE>

anyways thanks in advance for the help =o)

Name: Anonymous 2007-11-09 3:12

>>40
WHY IS IT SO FUCKING BLOATED

Name: Anonymous 2007-11-09 3:27

>>41
It's not bloated, it's ENTERPRISE.

Name: Anonymous 2007-11-09 4:54

>>40
This somehow looks ENTERPRISE.

Name: Anonymous 2007-11-09 6:24

>>43
Protip: It could be ALOT more ENTERPRISE.

Name: Anonymous 2007-11-09 6:29

yeah it doesn't even have any comments or gotos

Name: Anonymous 2007-11-09 9:28

>>1
protip: read a book on programming before looking to 4chan for help. If you can't tell one language from another or blatantly demonstrate that you don't know your shit you aren't going to ever get a straight answer...

and wear flameproof clothing

Name: Anonymous 2007-11-09 10:11

>>35 >>40
Just more proof that C is better, though bugier, than Java.

Name: Anonymous 2007-11-09 10:37

Does this look better, Mike:


#include <stdio.h>

#define ConsoleWrite printf
#define ConsoleRead scanf
#define then

int main (void)
{
   int Number1, Number2, Average;

NumberOne:
   ConsoleWrite ("Please enter number one: ");
   ConsoleRead ("%d", &Number1);
   if (Number1 == 0) then goto NumberOne;

NumberTwo:
   ConsoleWrite ("Please enter number two: ");
   ConsoleRead ("%d", &Number2);
   if (Number2 == 0) then goto NumberTwo;

   Average = (Number1 + Number2) / 2;

   ConsoleWrite ("The average of %d and %d is %d.", Number1, Number2, Average);

   return 0;
}

Name: Anonymous 2007-11-09 15:25

You've all been trolled, fools.

Name: Anonymous 2007-11-09 22:11

>>49
yhbt

Name: Anonymous 2009-03-06 8:26

The topic or is   it just your   way to say   There is not   good enough Learn.

Name: Anonymous 2009-03-06 13:23

y you should choose your operators properly   and if none   fit use a   Calculator your fine   I have been   struggling to find   love off the   Lisp machines get?

Name: ​​​​​​​​​​ 2010-10-21 16:56

Name: Anonymous 2010-11-14 6:36

Name: Anonymous 2011-01-31 21:27

<-- check em dubz

Name: Anonymous 2011-02-04 14:52

<

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List