Click here to Skip to main content
15,880,427 members
Home / Discussions / C#
   

C#

 
QuestionFound incredible notepad like source editor Pin
Heinz_9-Sep-05 18:06
Heinz_9-Sep-05 18:06 
QuestionThreads, Socket and StateObject Pin
tekken229-Sep-05 16:31
tekken229-Sep-05 16:31 
AnswerRe: Threads, Socket and StateObject Pin
S. Senthil Kumar9-Sep-05 22:15
S. Senthil Kumar9-Sep-05 22:15 
GeneralRe: Threads, Socket and StateObject Pin
tekken2210-Sep-05 4:12
tekken2210-Sep-05 4:12 
GeneralRe: Threads, Socket and StateObject Pin
S. Senthil Kumar10-Sep-05 4:40
S. Senthil Kumar10-Sep-05 4:40 
QuestionMath troubles Pin
KaptinKrunch9-Sep-05 15:02
KaptinKrunch9-Sep-05 15:02 
AnswerRe: Math troubles Pin
S. Senthil Kumar9-Sep-05 22:19
S. Senthil Kumar9-Sep-05 22:19 
AnswerRe: Math troubles Pin
Member 19610719-Sep-05 23:04
Member 19610719-Sep-05 23:04 
using System;

namespace fact
{
///
/// Summary description for Class1.
///

class Class1
{
///
/// The main entry point for the application.
///

[STAThread]
static void Main(string[] args)
{
//calculate n!
Console.WriteLine("Enter the value of N");
int nFact = 1;
int nComputeTo =int.Parse(Console.ReadLine());

int nCurDig = 1;
for (nCurDig=1;nCurDig <= nComputeTo; nCurDig++)
nFact *= nCurDig;
int Nfactorial=nFact;
Console.WriteLine("n! = "+nFact+"\n");

//calculate (n-k) !
Console.WriteLine("Enter the value of K");
int nFact1 = 1;
int k=int.Parse(Console.ReadLine());

int nComputeTo1=nComputeTo-k;//n-k

int nCurDig1 = 1;
for (nCurDig1=1;nCurDig1 <= nComputeTo1; nCurDig1++)
nFact1 *= nCurDig1;
int NminusKfactorial=nFact1;

try
{
int npk=Nfactorial/NminusKfactorial;//n_p_k=n!/(n-k)!
Console.WriteLine("(n-k)! = "+nFact1+"\n");
Console.WriteLine(" n_p_k="+npk);
Console.ReadLine();
}
catch(DivideByZeroException ex)
{
Console.WriteLine(ex.Message);
}
catch(OverflowException ex)
{
Console.WriteLine(ex.Message);
}
catch(Exception e)
{
Console.WriteLine(e.Message);
}

}
}
}
AnswerRe: Math troubles Pin
Andy Brummer10-Sep-05 6:33
sitebuilderAndy Brummer10-Sep-05 6:33 
AnswerRe: Math troubles Pin
KaptinKrunch10-Sep-05 8:39
KaptinKrunch10-Sep-05 8:39 
GeneralRe: Math troubles Pin
leppie10-Sep-05 10:04
leppie10-Sep-05 10:04 
QuestionRowCount of a DataTable Pin
surfman199-Sep-05 14:14
surfman199-Sep-05 14:14 
AnswerRe: RowCount of a DataTable Pin
Expert Coming9-Sep-05 14:18
Expert Coming9-Sep-05 14:18 
GeneralRe: RowCount of a DataTable Pin
Andy Brummer9-Sep-05 14:49
sitebuilderAndy Brummer9-Sep-05 14:49 
AnswerRe: RowCount of a DataTable Pin
Gary Thom9-Sep-05 14:19
Gary Thom9-Sep-05 14:19 
AnswerRe: RowCount of a DataTable Pin
surfman199-Sep-05 14:20
surfman199-Sep-05 14:20 
QuestionDeserialize Error Pin
dicas9-Sep-05 13:50
dicas9-Sep-05 13:50 
AnswerRe: Deserialize Error Pin
Guffa9-Sep-05 13:56
Guffa9-Sep-05 13:56 
GeneralRe: Deserialize Error Pin
Daniel132410-Sep-05 2:21
Daniel132410-Sep-05 2:21 
QuestionHow to make DebugView see my program Pin
Susan Hernandez9-Sep-05 12:37
Susan Hernandez9-Sep-05 12:37 
AnswerRe: How to make DebugView see my program Pin
Andy Brummer9-Sep-05 15:01
sitebuilderAndy Brummer9-Sep-05 15:01 
GeneralRe: How to make DebugView see my program Pin
Susan Hernandez12-Sep-05 6:00
Susan Hernandez12-Sep-05 6:00 
AnswerRe: How to make DebugView see my program Pin
S. Senthil Kumar9-Sep-05 22:27
S. Senthil Kumar9-Sep-05 22:27 
GeneralRe: How to make DebugView see my program Pin
Susan Hernandez12-Sep-05 6:06
Susan Hernandez12-Sep-05 6:06 
QuestionData Table Error Pin
Expert Coming9-Sep-05 11:48
Expert Coming9-Sep-05 11:48 

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.