Results for “number”
Small, practical examples. Search by task or narrow things down below.
Call a library function
C#: Use a standard absolute-value function with a small negative number.
C#✓ Tested
Call a library function
Java: Use a standard absolute-value function with a small negative number.
Java✓ Tested
Call a library function
JavaScript: Use a standard absolute-value function with a small negative number.
JavaScript✓ Tested
Call a library function
TypeScript: Use a standard absolute-value function with a small negative number.
TypeScript✓ Tested
Call a library function
C++: Use a standard absolute-value function with a small negative number.
C++✓ Tested
Call a library function
C: Use a standard absolute-value function with a small negative number.
C✓ Tested
Clamp a value to a range
Use C++17 clamp to bound a numeric value.
C++✓ Tested
Count five LED flashes with a for loop
Arduino / C: Repeat an LED action a known number of times and print the current count.
Arduino / C✓ Tested
Count matching values
Count even numbers in a fixed C array.
C✓ Tested
Filter items in a pipeline
Keep numbers that meet a condition.
Where-Object✓ Tested
Find the largest value
Check for an empty C++ vector before dereferencing max_element.
C++✓ Tested
Format a decimal value
Print two fractional digits with C printf.
C✓ Tested