© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
13 replies
Wicked Cat

❔ Why is my decimal rounding?

I have to be missing something obvious but I would appreciate some help >.>

with merchant.markup = 20, the decimal markup should be 1.2 but it's 1
'
 decimal markup = (CurrentMerchant.Markup / 100) + 1;
 decimal markup = (CurrentMerchant.Markup / 100) + 1;
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

✅ DateTime rounding struggles
C#CC# / help
10mo ago
Rounding? (Urgent) [Answered]
C#CC# / help
4y ago
❔ something in my code is doubling one of my decimal variables
C#CC# / help
3y ago
✅ Why wont it output to 2 decimal points?
C#CC# / help
2y ago