TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Luis Carmona
NA
1
2.6k
Coding a (for loop) for raising a power
Nov 27 2011 10:48 PM
I could use some help on this code that I am writing. I am trying to code a for loop to raise a power of a number here is what I have so far any sugg.
long lngBase = 0;
long lngRaise = 0;
long lngResult = 1;
lngBase = Convert.ToInt64(txtBase.Text);
lngRaise = Convert.ToInt64(txtExponent.Text);
for (lngBase = 1; lngBase <= lngRaise; lngBase++)
{
lngResult = lngBase * lngRaise;
}
txtResult.Text = lngResult.ToString("n0");
Reply
Answers (
1
)
A Regex problem
Couldnot add connection string to web config file