CabConModding
Facebook
Twitter
youtube
Discord
Contact us
RSS
Menu
CabConModding
Home
New
Top
Premium
Rules
FAQ - Frequently Asked Questions
Games
Fornite
Call of Duty: Black Ops 3
Clash of Clans
Grand Theft Auto 5
Apex Legends
Assassin’s Creed Origins
Forums
Premium
Latest posts
What's new
Latest posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Log in
Register
What's new
Premium
Latest posts
Menu
Log in
Register
Navigation
Install the app
Install
More options
Dark Theme
Contact us
Close Menu
Forums
Tech Boards
Computer Programming
Releases
REEILYMods Numbergame
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="REEILYMods" data-source="post: 14442" data-attributes="member: 1497"><p style="text-align: center">Hello community!</p> <p style="text-align: center">I'm always trying to improve my C++ skills and I'm on a good way!</p> <p style="text-align: center">Today I'm releasing a small numbergame,</p> <p style="text-align: center">that cost me a lot of nerves! <img src="/styles/default/xenforo/smilies.emoji/people/slight_smile.emoji.svg" class="smilie" loading="lazy" alt=":smile:" title="Smile :smile:" data-shortname=":smile:" /></p> <p style="text-align: center"></p> <p style="text-align: center">[SPOILER="Picture"]</p> <p style="text-align: center"><a href="http://prntscr.com/d1didk" target="_blank">Screenshot by Lightshot</a></p> <p style="text-align: center">[/SPOILER]</p> <p style="text-align: center"></p> <p style="text-align: center">[SPOILER="Credits"]</p> <p style="text-align: center">-Me</p> <p style="text-align: center">.A good book for learning C++</p> <p style="text-align: center">( It's german so it's useless to give the name <img src="/styles/default/xenforo/smilies.emoji/people/smile.emoji.svg" class="smilie" loading="lazy" alt=":grinning:" title="Grinning :grinning:" data-shortname=":grinning:" /> )</p> <p style="text-align: center">[/SPOILER]</p> <p style="text-align: center"></p> <p style="text-align: center">[SPOILER="Virusscan"]</p> <p style="text-align: center"><a href="https://www.virustotal.com/de/file/4f62052249b8a6a4b652d195590af7111856d6b920b9d00e07ec7c8297bcc449/analysis/1477941123/" target="_blank">Antivirus scan for 4f62052249b8a6a4b652d195590af7111856d6b920b9d00e07ec7c8297bcc449 at2016-10-31 19:12:03 UTC - VirusTotal</a></p> <p style="text-align: center">[/SPOILER]</p> <p style="text-align: center"></p> <p style="text-align: center">[SPOILER="Download"]</p> <p style="text-align: center"><a href="http://www.mediafire.com/file/d9sge3io0881mhn/REEILYMods+Number+Game.exe" target="_blank">REEILYMods Number Game</a></p> <p style="text-align: center">[/SPOILER]</p> <p style="text-align: center"></p> <p style="text-align: center">[SPOILER="Source"]</p> <p style="text-align: center">[CODE]</p> <p style="text-align: center"></p> <p style="text-align: center">//Sadly I used german declarations for ints, the long long and the bool!</p> <p style="text-align: center"></p> <p style="text-align: center">#include <iostream></p> <p style="text-align: center">#include <ctime></p> <p style="text-align: center">#include <cstdlib></p> <p style="text-align: center"></p> <p style="text-align: center">using namespace std;</p> <p style="text-align: center"></p> <p style="text-align: center">int main()</p> <p style="text-align: center">{</p> <p style="text-align: center"> bool gefunden = false;</p> <p style="text-align: center"> char input = 'w';</p> <p style="text-align: center"> int zahl, versuch, ratezahl;</p> <p style="text-align: center"> long long sek;</p> <p style="text-align: center"> time(&sek);</p> <p style="text-align: center"> srand((unsigned)sek);</p> <p style="text-align: center"> while (input == 'w')</p> <p style="text-align: center"> {</p> <p style="text-align: center"> system("cls");</p> <p style="text-align: center"> cout << "*** A NUMBERGAME ***\n"</p> <p style="text-align: center"> << "Spielregeln:\n"</p> <p style="text-align: center"> << "# 1 I'm going to generate a number between 0 and 15!\n"</p> <p style="text-align: center"> << "# 2 You have 3 tries to guess the number!\n"</p> <p style="text-align: center"> << "And now have fun!"</p> <p style="text-align: center"> << endl;</p> <p style="text-align: center"> zahl = (rand() % 15 + 1);</p> <p style="text-align: center"> versuch = 0;</p> <p style="text-align: center"> while (!gefunden && versuch < 3)</p> <p style="text-align: center"> {</p> <p style="text-align: center"> cin.sync();</p> <p style="text-align: center"> cin.clear();</p> <p style="text-align: center"> cout << ++versuch << ". Try" << endl;</p> <p style="text-align: center"> cin >> ratezahl;</p> <p style="text-align: center"> if (ratezahl < zahl)</p> <p style="text-align: center"> cout << "Your number is too small!" << endl;</p> <p style="text-align: center"> else if (ratezahl > zahl)</p> <p style="text-align: center"> cout << "Your number is too big!" << endl;</p> <p style="text-align: center"> else</p> <p style="text-align: center"> gefunden = true;</p> <p style="text-align: center"> }</p> <p style="text-align: center"> if (!gefunden)</p> <p style="text-align: center"> cout << "I have won! The number was: " << zahl << endl;</p> <p style="text-align: center"> else</p> <p style="text-align: center"> cout << "Nice! You have won and bet the MASTER!" << endl;</p> <p style="text-align: center"> cout << "Would you like to restart? Enter [w] to restart, [q] to quit!"</p> <p style="text-align: center"> << endl;</p> <p style="text-align: center"> do</p> <p style="text-align: center"> cin.get(input);</p> <p style="text-align: center"> while (input != 'w' && input != 'q');</p> <p style="text-align: center"> }</p> <p style="text-align: center"></p> <p style="text-align: center"> system("pause");</p> <p style="text-align: center"> return 0;</p> <p style="text-align: center">}[/CODE]</p> <p style="text-align: center"></p> <p style="text-align: center">[/SPOILER]</p> <p style="text-align: center"></p></blockquote><p></p>
[QUOTE="REEILYMods, post: 14442, member: 1497"] [CENTER]Hello community! I'm always trying to improve my C++ skills and I'm on a good way! Today I'm releasing a small numbergame, that cost me a lot of nerves! :smile: [SPOILER="Picture"] [URL='http://prntscr.com/d1didk']Screenshot by Lightshot[/URL] [/SPOILER] [SPOILER="Credits"] -Me .A good book for learning C++ ( It's german so it's useless to give the name :grinning: ) [/SPOILER] [SPOILER="Virusscan"] [URL='https://www.virustotal.com/de/file/4f62052249b8a6a4b652d195590af7111856d6b920b9d00e07ec7c8297bcc449/analysis/1477941123/']Antivirus scan for 4f62052249b8a6a4b652d195590af7111856d6b920b9d00e07ec7c8297bcc449 at2016-10-31 19:12:03 UTC - VirusTotal[/URL] [/SPOILER] [SPOILER="Download"] [URL='http://www.mediafire.com/file/d9sge3io0881mhn/REEILYMods+Number+Game.exe']REEILYMods Number Game[/URL] [/SPOILER] [SPOILER="Source"] [CODE] //Sadly I used german declarations for ints, the long long and the bool! #include <iostream> #include <ctime> #include <cstdlib> using namespace std; int main() { bool gefunden = false; char input = 'w'; int zahl, versuch, ratezahl; long long sek; time(&sek); srand((unsigned)sek); while (input == 'w') { system("cls"); cout << "*** A NUMBERGAME ***\n" << "Spielregeln:\n" << "# 1 I'm going to generate a number between 0 and 15!\n" << "# 2 You have 3 tries to guess the number!\n" << "And now have fun!" << endl; zahl = (rand() % 15 + 1); versuch = 0; while (!gefunden && versuch < 3) { cin.sync(); cin.clear(); cout << ++versuch << ". Try" << endl; cin >> ratezahl; if (ratezahl < zahl) cout << "Your number is too small!" << endl; else if (ratezahl > zahl) cout << "Your number is too big!" << endl; else gefunden = true; } if (!gefunden) cout << "I have won! The number was: " << zahl << endl; else cout << "Nice! You have won and bet the MASTER!" << endl; cout << "Would you like to restart? Enter [w] to restart, [q] to quit!" << endl; do cin.get(input); while (input != 'w' && input != 'q'); } system("pause"); return 0; }[/CODE] [/SPOILER] [/CENTER] [/QUOTE]
Verification
Post reply
Forums
Tech Boards
Computer Programming
Releases
REEILYMods Numbergame
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…
Top