C
C#8mo ago
Muhammad

❔ ✅ Fruit Machine Game

Need to figure out how to keep an integer a certain length
No description
6 Replies
Muhammad
Muhammad8mo ago
It takes away 0.2 from the balance everytime another spin is made how can i make it go from 0.60000000000001 to 0.6?
Hackmagician
Hackmagician8mo ago
Math.Round(original, 1) 1 being 1 decimal so .6 in this case
Muhammad
Muhammad8mo ago
what's original meant to be
Hackmagician
Hackmagician8mo ago
this Round() takes a double number and a int decimals
Muhammad
Muhammad8mo ago
else if (response == "Y")
{
second_initiator = false;
new_balance = new_balance - 0.2;
}
else if (response == "Y")
{
second_initiator = false;
new_balance = new_balance - 0.2;
}
is Math. built-in? Thank you 🙂 !close
Accord
Accord8mo ago
Closed! Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server
More Posts
✅ Basic SQL question;Next week im starting a lab pertaining to SQL and was wondering which program you guys use for that?❔ Releasing SoftwareI recently wrote a program using Avalonia, and I’ve uploaded an exe to github on the project so userHow can I create an ardalis put endpoint request with id in route and payload in body?Sample: ```cs public class UpdateById : EndpointBaseAsync.WithRequest<DocumentTemplateUpdateByIdRequ❔ I would like to use an SQL query on a consecutive Select HTML element.I have this form were I can add a product, a Product is made with this structure: ```csharp pub❔ can't insert listbox items from txt file?Hello, I'm hoping to have a list box show items from a txt file on my C:\ drive, but I can't seem to❔ ✅ [SOLVED] The .NET Core SDK cannot be located: Error running dotnetThe .NET Core SDK cannot be located: Error running dotnet --info: It was not possible to find any in✅ Debugging exceptions not caught by try-catchHi, I have a small piece of code I am having trouble debugging. I have this class: ```cs public stat❔ Framework and Services for C# desktop chat appSo I started programming a chat app which uses .netframework and wpf and I've recently come back to ❔ Ef core relationsHey, im working on a simple project and im getting so much confused about how efcore works. I have t❔ How to configure an external provider in .Net8 Blazor with individual auth?Hey guys, I'm having problems adding an external authentication provider to the basic Blazor WebApp