Results for “date arithmetic”
Small, practical examples. Search by task or narrow things down below.
Calculate a simple total
TypeScript: Multiply a unit price by a quantity, then add a delivery fee.
TypeScript✓ Tested
Calculate a simple total
PowerShell: Calculate a simple total using PowerShell 7.
PowerShell✓ Tested
Calculate a simple total
C++: Multiply a unit price by a quantity, then add a delivery fee.
C++✓ Tested
Calculate a simple total
C: Multiply a unit price by a quantity, then add a delivery fee.
C✓ Tested
Calculate a subtotal
Calculate a subtotal using a complete Go program with explicit sample inputs.
Go✓ Tested
Calculate a value with SELECT
SQL: Evaluate a small arithmetic expression on the database server.
SQL✓ Tested
Calculate a value with SELECT
SQL Server: Evaluate a small arithmetic expression on the database server.
SQL Server✓ Tested
Calculate a value with SELECT
Postgres: Evaluate a small arithmetic expression on the database server.
Postgres✓ Tested
Calculate a value with SELECT
SQLite: Evaluate a small arithmetic expression on the database server.
SQLite✓ Tested
Calculate an order subtotal
Calculate an order subtotal in a complete Rust program using the standard library.
Rust✓ Tested
Check positive integer addition before performing it
C: Check the upper boundary before adding two known nonnegative integers.
C✓ Tested
Check the Gregorian leap-year rule
Java: Use Year.isLeap rather than checking divisibility by four alone.
Java✓ Tested