Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Spot the bug
/
C#
/
Data types
Spot the bug in the order total
from Data types
C# 14 / .NET 10
beginner
4 min
1 issue to find
Find the overflow bug in this order-total calculation.
csharp
Copy
static
long
TotalCents
(
int
quantity
,
int
unitCents)
{
return
quantity
*
unitCents;
}
Reveal
Copy code
Open in playground
Ask AI about this kata
Report an error
previous kata
Review generated invoice importer
Review AI code
A new version is available
Reload