Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

write code for Factorial?

Answer Posted / sathish

private void btnCalculae_Click(object sender,
System.EventArgs e)
{
string str =txt1.text;
int fact=1;
foreach char c in str
{
fact=convert.toint32(c)*fact;
}
txt2.text=fact;
}

Is This Answer Correct ?    4 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is there any sample c# code for simple threading?

969


Is string mutable in c#?

919


What is difference between throw and throws in c#?

925


what is a destructor?

1045


in the nunit test framework, which attribute must adorn a test class in order for it to be picked up by the nunit gui?

1208


Why delegate is used in c#?

970


What is disco?

979


Why do we use class in c#?

973


How is method overriding different from overloading?

1093


Describe ado.net?

1107


Why we use delegates in c#?

938


What is view state c#?

931


Are arrays value types or reference types?

973


Does main have to be static c#?

1129


Differentiate between copy and default constructor.

1066