Results for “WITH”
Small, practical examples. Search by task or narrow things down below.
Calculate the dot product of two vectors
C++: inner_product multiplies corresponding elements and accumulates them from a chosen seed.
C++✓ Tested
Calculate the greatest common divisor
C: Euclid’s algorithm repeatedly replaces a pair with the divisor and remainder.
C✓ Tested
Calculate the number of calendar days between dates
C#: Subtract DayNumber values when the inputs are calendar dates.
C#✓ Tested
Calculate the number of required pages
Python: Use integer arithmetic to round a nonnegative count up to a positive page size.
Python✓ Tested
Calculate whole days between dates
Subtract Julian day values for date-only inputs.
julianday✓ Tested
Calculate with exact rational values
Python: Use Fraction for exact ratios rather than binary floating-point approximations.
Python✓ Tested
Calculate with integer arithmetic
Bash Scripts: Calculate with integer arithmetic with a small standalone Bash program.
Bash Scripts✓ Tested
Calculate with integer values
Arduino / C: Calculate with integer values on an Uno with the Serial Monitor set to 9600 baud.
Arduino / C✓ Tested
Call a component method from an event
Call a component method from an event with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Call a function with a return value
Call a function with a return value using a complete Go program with explicit sample inputs.
Go✓ Tested
Call a library function
Python: Use a standard absolute-value function with a small negative number.
Python✓ Tested
Call a library function
C#: Use a standard absolute-value function with a small negative number.
C#✓ Tested