Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Software Development
Programming
Programming Q&A
'Netbeans, how can i make a scoringsystem?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="SystemSequence" data-source="post: 386571" data-attributes="member: 66293"><p>Assuming you have if statements, you can just add a int variable with increment whenever the statement is true.</p><p></p><p>OffT: Be kind, I promise you will get thousands of thousands result of this exact problem you have on Google.</p><p></p><p>Like this:</p><p>[CODE]Int points = 0; (Somewhere in the class/method so it will not be changed)</p><p>points++; (Under every if-statement whenever it's true)</p><p>[/CODE]</p><p></p><p>And then in you "Check answers" button or something do this,</p><p>[CODE]if(points <= 5) {</p><p> // u loose, do something</p><p>}</p><p>else {</p><p> // u win</p><p>}[/CODE]</p></blockquote><p></p>
[QUOTE="SystemSequence, post: 386571, member: 66293"] Assuming you have if statements, you can just add a int variable with increment whenever the statement is true. OffT: Be kind, I promise you will get thousands of thousands result of this exact problem you have on Google. Like this: [CODE]Int points = 0; (Somewhere in the class/method so it will not be changed) points++; (Under every if-statement whenever it's true) [/CODE] And then in you "Check answers" button or something do this, [CODE]if(points <= 5) { // u loose, do something } else { // u win }[/CODE] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Software Development
Programming
Programming Q&A
'Netbeans, how can i make a scoringsystem?
Top