|
Thread: a
-
Jan 17th, 2012, 10:04 AM
#1
Thread Starter
New Member
a
#include<iostream>
using namespace std;
int main(void)
{
int power,ctr,base,answer;
cout<<"Enter Number to raised=";
cin>>power; cin.ignore();
cout<<"Enter Number=";
cin>>base; cin.ignore();
for(ctr=1;ctr<=power;ctr++)
answer=answer*base;
{
cout<<"The answer is="<<answer;
}
cin.get();
return 0;
}
What's wrong with my code? Can you please help me?
-
Jan 17th, 2012, 10:04 AM
#2
Thread Starter
New Member
Re: a
#include<iostream>
using namespace std;
int main()
{
int power,ctr,base,answer;
cout<<"Enter Number to raised=";
cin>>power; cin.ignore();
cout<<"Enter Number=";
cin>>base; cin.ignore();
for(ctr=1;ctr<=power;ctr++)
answer=answer*base;
{
cout<<"The answer is="<<answer;
}
cin.get();
return 0;
}
-
Jan 17th, 2012, 03:21 PM
#3
Re: a
 Originally Posted by rosh
...
What's wrong with my code? Can you please help me?
Welcome to VBForums.
No.
Not unless you make an effort yourself. For instance you can provide the thread with a meaningful title describing the question, and describe the actual problem with your code.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|