people playing: 127, servers online: 37, games played: 142,000,000 Top Player: imapirate

  Toribash Community » Toribash » Mods » Third party
Register FAQ General Rules Community
Reply
 
Thread Tools Display Modes
Old Mar 27, 2018   #1
Retrou
Junior Member
 
Brown Belt
Join Date: Apr 2011
Posts: 12
Clan: Nightmare



FREE DOWNLOAD - usefull bet calculator
Hello everyone! ^.^
My name is Retrou and I love to bet. I made an application to help myself with calculating earnings from bets.

this app can show you:
-House rake
-Winner earnings
-Most profitable bet
-When you reach max profit

Unfortunately you have to write the total ammount of bets, the app is very primitive itself.

https://megawrzuta.pl/download/80292...53fbed2e4.html
You can download it freeware, I hope somebody will find this application usefull
Source code code:

int main()
{

int a = 0;
for (int i = 1; i == 1; i++)
{
cout << "Welcome to TC bet calculator. \n";
if (a == 0)
{
double x2, y1, y2;
cout << "1st player total bet TC ammount:";
cin >> y1;
cout << "2nd player total bet TC ammount:";
cin >> y2;
cout << "\t\t\t1st player wins:\n";
cout << "House rake/winner earnings:\t\t" << 0.1 * y2;
cout << "\nBets:\t\t\t";
for (int c = 100; c < 1000; c = c + 100)
{
if ((0.8*y2)*(c / (y1 + c)) >= 5 * c)
cout << "\n" << c << ":\t\t\t\t\t" << c*5 << "\treached max profit";
else
cout << "\n" << c << ":\t\t\t\t\t" << (0.8*y2)*(c / (y1 + c));
}
for (int d = 1000; d < 5000; d = d + 1000)
{
if ((0.8*y2)*(d / (y1 + d)) >= 5 * d)
cout << "\n" << d << ":\t\t\t\t\t" << d * 5 << "\treached max profit";
else
cout << "\n" << d << ":\t\t\t\t\t" << (0.8*y2)*(d / (y1 + d));
}
for (int j = 5000; j < 105000; j = j + 5000)
{
if ((0.8*y2)*(j / (y1 + j)) >= 5 * j)
cout << "\n" << j << ":\t\t\t\t\t" << j * 5 << "\treached max profit";
else
cout << "\n" << j << ":\t\t\t\t\t" << (0.8*y2)*(j / (y1 + j));
}
cout << "\n\t\t\t2nd player wins:\n";
cout << "House rake/winner earnings:\t\t" << 0.1 * y1;
cout << "\nBets:\t\t\t";
for (int q = 100; q < 1000; q = q + 100)
{
if ((0.8*y1)*(q / (y2 + q)) >= 5 * q)
cout << "\n" << q << ":\t\t\t\t\t" << q * 5 << "\treached max profit";
else
cout << "\n" << q << ":\t\t\t\t\t" << (0.8*y1)*(q / (y2 + q));
}
for (int w = 1000; w < 5000; w = w + 1000)
{
if ((0.8*y1)*(w / (y2 + w)) >= 5 * w)
cout << "\n" << w << ":\t\t\t\t\t" << w * 5 << "\treached max profit";
else
cout << "\n" << w << ":\t\t\t\t\t" << (0.8*y1)*(w / (y2 + w));
}
for (int r = 5000; r < 105000; r = r + 5000)
{
if ((0.8*y1)*(r / (y2 + r)) >= 5 * r)
cout << "\n" << r << ":\t\t\t\t\t" << r * 5 << "\treached max profit";
else
cout << "\n" << r << ":\t\t\t\t\t" << (0.8*y1)*(r / (y2 + r));
}
cout << "\n\ndo you want to proceed? (type 0 to continue)\n:";
cin >> i;
}
else;
}

return 0;
}


If you have some questions or suggestions for the app, please make a comment. I will try to do my best!

If you want to support me or my content, send some TC

See ya in the betting room!

p.s. dont worry its not trojan.
p.p.s. dont laugh at the code, im a begginer.

Last edited by Retrou; Mar 27, 2018 at 11:24 PM.. Reason: adding source code
Retrou is offline   Reply With Quote
Old Mar 27, 2018   #2
TyZi
it is i, tyzerino gambino las vegas marino honda civic
 
nothing Belt
Join Date: Jun 2009
Posts: 8,825



Hi! I've moved this thread to the correct place. However, please still add source code if it's not done so in your download link.


Help Squad
Questions, Applications? PM me!
also responds to "tizzy patric!K!"
TyZi is offline   Reply With Quote
Old Mar 28, 2018   #3
Elite
Senior Member
 
God Belt
Join Date: Jun 2015
Posts: 1,255



that's some nice C++ there, could use some cleaning up but overall nice.
feel free to join my server in my signature if you ever need help with programming.

might use this here and there, only thing i'd change is maybe put the calcuation stuff in a function.
Elite is offline   Reply With Quote
Old Mar 28, 2018   #4
Retrou
Junior Member
 
Brown Belt
Join Date: Apr 2011
Posts: 12
Clan: Nightmare



Thank you for your comment! I know there is a lot of mess (for example "a" is useless, it was used in different part and never removed) and the main is too long, but the point was to write something working really fast (30 minutes). Im thinking about some java aplets which can operate on data gathered from toribash. Topic is pretty hot for me, i have to pass my exams.
Retrou is offline   Reply With Quote
Old Mar 28, 2018   #5
Elite
Senior Member
 
God Belt
Join Date: Jun 2015
Posts: 1,255



Originally Posted by Retrou View Post
Thank you for your comment! I know there is a lot of mess (for example "a" is useless, it was used in different part and never removed) and the main is too long, but the point was to write something working really fast (30 minutes). Im thinking about some java aplets which can operate on data gathered from toribash. Topic is pretty hot for me, i have to pass my exams.

Once again, if ya ever need help my server has some helpful people
and i mainly focus on optimizing/removing useless stuff once i get functionality down.

Another thing i'd change is instead of using \n in strings to create a new line, do cpp code:

<< endl;
after the string

Last edited by Elite; Mar 28, 2018 at 01:54 AM..
Elite is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:47 AM.




Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
ragdoll fighting game physics fighting game ragdoll fighting physics funmotion joints martial arts karate pc mac free game turn based game