Hey Guys,

I have started using Visual basic 6.0 but i'm running into a few troubles.

How can i write this psuedo code into visual basic:

BEGIN even and odd numbers
    PUT "Enter a number : "
    GET num
    even = 0
    odd = 0
    WHILE num <> -1
        IF (num MOD 2) = 0 THEN
            even = even +1
        ELSE
            odd = odd + 1
        END IF
        PUT "Enter a number : "
        GET num
    WEND
    PUT "The number of even numbers = ", even
    PUT "The number of odd numbers = ", odd
END even and odd numbers

Any help would be greatly apprecieated.

Thanks,

Jem.

1. remove the begin end part
2.use INPUT BOX instead of PUT
3.accept the value from inputbox instead of GET.

rest almost remains

declare even and odd as integer and value to accomodate input (get).
to insert (put) number you can use text box or inputbox.

Hey guys thanks for your help so far but how do i accomodate the input

Thanks.

Don't worry i did some googling and found it out thanks for your help.

ha...3x, google is great searcher machine...:)

commented: :D jokes +1
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.