View previous topic :: View next topic |
Author |
Message |
paupav Master Cheater
Reputation: 13
Joined: 15 Apr 2011 Posts: 314 Location: P. Sherman 42, Wallaby Way, Sydney
|
Posted: Sat Oct 15, 2011 3:44 pm Post subject: Whats wrong here? |
|
|
Code: |
#include <iostream>
int main ()
{
using namespace std;
int a, b, c;
cin >> a;
cout << " You have entered " << a;
if (a <= 100)
{
b=88;
b=c;
cout << "\n\n\n\nb= " << b << "\n\nand c= " << c;
}
else
if (a > 100)
{
b=76576574;
b=c;
cout << " b= " << b << "\n\nand c= " << c;
}
cout << "\n\n\n\n";
system("pause");
return 0;
}
|
it shows b and c always 2
[SOLVED]
solved...
instead of
should write:
Last edited by paupav on Sun Oct 16, 2011 4:40 am; edited 1 time in total |
|
Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Sat Oct 15, 2011 4:28 pm Post subject: |
|
|
Just a heads up, if you are going to post requesting help in the future do not just post code and expect us to figure out whats wrong. Explain what is not working as you expected it would, post errors if you have any etc. but don't just post code or your topics will be locked.
_________________
- Retired. |
|
Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Sat Oct 15, 2011 5:40 pm Post subject: |
|
|
that's an interesting indentation style you're using
|
|
Back to top |
|
 |
paupav Master Cheater
Reputation: 13
Joined: 15 Apr 2011 Posts: 314 Location: P. Sherman 42, Wallaby Way, Sydney
|
Posted: Sun Oct 16, 2011 4:37 am Post subject: |
|
|
Wiccaan wrote: | Just a heads up, if you are going to post requesting help in the future do not just post code and expect us to figure out whats wrong. Explain what is not working as you expected it would, post errors if you have any etc. but don't just post code or your topics will be locked. |
sry i forgot
|
|
Back to top |
|
 |
|