Click here to Skip to main content
15,887,446 members
Home / Discussions / C#
   

C#

 
AnswerRe: How can I send a message to cmd Pin
Jegan Thiyagesan15-Apr-13 23:55
Jegan Thiyagesan15-Apr-13 23:55 
AnswerRe: How can I send a message to cmd Pin
dusty_dex16-Apr-13 0:09
dusty_dex16-Apr-13 0:09 
AnswerRe: How can I send a message to cmd Pin
Pete O'Hanlon16-Apr-13 0:40
mvePete O'Hanlon16-Apr-13 0:40 
GeneralRe: How can I send a message to cmd Pin
TwilgihtPrince16-Apr-13 6:33
TwilgihtPrince16-Apr-13 6:33 
GeneralRe: How can I send a message to cmd Pin
Dave Kreskowiak16-Apr-13 7:54
mveDave Kreskowiak16-Apr-13 7:54 
GeneralRe: How can I send a message to cmd Pin
TwilgihtPrince17-Apr-13 14:28
TwilgihtPrince17-Apr-13 14:28 
GeneralRe: How can I send a message to cmd Pin
Dave Kreskowiak17-Apr-13 15:22
mveDave Kreskowiak17-Apr-13 15:22 
QuestionHow would I put this code in Tabular format. (like a chart) Pin
Member 999052915-Apr-13 17:36
Member 999052915-Apr-13 17:36 
C#
using System;

using System.Collections.Generic;

using System.Text;



namespace ConsoleApplication1
{

    class Program
    {



        static int Fact(int n)
        {

            if (n <= 1)

                return 1;

            return n * Fact(n - 1);

        }



        static int Factorial(int n)
        {

            if (n <= 1)

                return 1;

            int result = 1;


            {
 for (int i = 2; i <= n; i++)
                result = result * i;

            }

            return result;

        }





        static void Main(string[] args)
        {





            Console.Write("Enter a Number to find factorial: ");

            int n = Convert.ToInt32(Console.ReadLine());

            int r = Fact(n);

            Console.WriteLine(n.ToString() + "! = " + r.ToString());



            Console.Write("Enter a Number to find factorial: ");

            n = Convert.ToInt32(Console.ReadLine());

            r = Factorial(n);

            Console.WriteLine(n.ToString() + "! = " + r.ToString());

            Console.Write("Enter a Number to find factorial: ");

            n = Convert.ToInt32(Console.ReadLine());

            r = Factorial(n);

            Console.WriteLine(n.ToString() + "! = " + r.ToString());

            Console.Write("Enter a Number to find factorial: ");

            n = Convert.ToInt32(Console.ReadLine());

            r = Factorial(n);

            Console.WriteLine(n.ToString() + "! = " + r.ToString());

            Console.Write("Enter a Number to find factorial: ");

            n = Convert.ToInt32(Console.ReadLine());

            r = Factorial(n);

            Console.WriteLine(n.ToString() + "! = " + r.ToString());


            Console.ReadLine();
        }

    }

}

AnswerRe: How would I put this code in Tabular format. (like a chart) Pin
Richard MacCutchan15-Apr-13 21:16
mveRichard MacCutchan15-Apr-13 21:16 
QuestionSql Database Pin
Member 982174015-Apr-13 12:17
Member 982174015-Apr-13 12:17 
AnswerRe: Sql Database Pin
Dave Kreskowiak15-Apr-13 13:04
mveDave Kreskowiak15-Apr-13 13:04 
AnswerRe: Sql Database Pin
Bernhard Hiller15-Apr-13 21:25
Bernhard Hiller15-Apr-13 21:25 
AnswerRe: Sql Database Pin
Abhinav S16-Apr-13 21:07
Abhinav S16-Apr-13 21:07 
QuestionLink Button in Repeater Control in Winform Application Pin
Member 351820815-Apr-13 4:02
Member 351820815-Apr-13 4:02 
AnswerRe: Link Button in Repeater Control in Winform Application Pin
Abhinav S15-Apr-13 4:35
Abhinav S15-Apr-13 4:35 
GeneralRe: Link Button in Repeater Control in Winform Application Pin
Ravi Bhavnani15-Apr-13 17:58
professionalRavi Bhavnani15-Apr-13 17:58 
GeneralRe: Link Button in Repeater Control in Winform Application Pin
Abhinav S15-Apr-13 18:17
Abhinav S15-Apr-13 18:17 
Questioni want code to remove submenu Pin
Azza ALbelushi13-Apr-13 23:53
Azza ALbelushi13-Apr-13 23:53 
AnswerRe: i want code to remove submenu Pin
obalesu14-Apr-13 22:57
obalesu14-Apr-13 22:57 
GeneralRe: i want code to remove submenu Pin
AmitGajjar15-Apr-13 2:21
professionalAmitGajjar15-Apr-13 2:21 
GeneralRe: i want code to remove submenu Pin
DanielSheets15-Apr-13 4:44
DanielSheets15-Apr-13 4:44 
JokeRe: i want code to remove submenu Pin
Tom Deketelaere15-Apr-13 4:48
professionalTom Deketelaere15-Apr-13 4:48 
GeneralRe: i want code to remove submenu Pin
DanielSheets15-Apr-13 4:49
DanielSheets15-Apr-13 4:49 
GeneralRe: i want code to remove submenu Pin
AmitGajjar15-Apr-13 5:49
professionalAmitGajjar15-Apr-13 5:49 
AnswerRe: i want code to remove submenu Pin
Rockstar_16-Apr-13 18:32
professionalRockstar_16-Apr-13 18:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.