Ok i'm doing a decimal to binary converter with C# i know most of you don't know the language but it's very similar to C++ so please take a look

Code:
/*The equation to convert Decimal to Binary is the following: 
 * *)Take the number in a variable called x
 * 2)Get the remainder of x untill it's equal to * and put them in an array list
 * *)Print the array backwards
 */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;

namespace NS
{
    class Program
    {
        static void Main(string[] args)
        {
            // Take the number we would like to convert ....
            int x = 0;
            //The remainder will be here...
            ArrayList arr = new ArrayList();
            //End of variable declaration.....
            Console.Write("Enter any number you would like to convert: ");
            x = int.Parse(Console.ReadLine());
            //Got the number now let's divide it untill it's equal 0 and pickup the remainders
            for (int i = 0; x > 0; i++)
            {
                arr.Add(x % 2);
                for (int s = 0; i < arr.Count; s++)
                {
                    Console.WriteLine(arr[s]);
                }
            }
        }
    }
}
I want the program to get the remainder of x untill x is equal to 0 and print the remainders :-) using an arraylist
** an arraylist is an object variable with no limits ... you can make an arraylist of integers and strings at the same time! So i'm using an arraylist to get all the remainders and print them backwards later (to convert to binary)
Also visit : [URL="http://www.helpwithpcs.com/courses/binary-numbers.htm"]http://www.helpwithpcs.com/courses/binary-numbers.htm[/URL]
to be able to help me , thanks!