the program asks to calculate the power of a number, for eg. if 2 is entered as the base and 3 is th power it should display 8.
awi123 0 Newbie Poster
Recommended Answers
Jump to Posti'll bet that, as part of the homework requirements, he's not allowed to use the <math.h> library
Jump to Postif (pow<0)
ans = 1.0/ans;
fractional powers would be more fun.:P
Jump to Postlich, if youre going to help,
(1) learn to indent your code properly
(2) learn to use tagsand for the record, your code is horribly fragile and will break if someone looks crosseyed at it.
.[code=c] tags
and for the record, your code is horribly …
All 12 Replies
selvaganapathy 31 Posting Pro
Major Major 6 Light Poster
jephthah 1,888 Posting Maven
Crushyerbones 0 Junior Poster in Training
Major Major 6 Light Poster
jephthah 1,888 Posting Maven
lich -11 Junior Poster in Training
lich -11 Junior Poster in Training
jephthah 1,888 Posting Maven
awi123 0 Newbie Poster
awi123 0 Newbie Poster
lich -11 Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.