FIND YOUR NEXT FEW LINES

Results for “C++”

Small, practical examples. Search by task or narrow things down below.

3000 snippets foundClear filters
JavaScriptGetting Started

Calculate a simple total

JavaScript: Multiply a unit price by a quantity, then add a delivery fee.

JavaScript✓ Tested
TypeScriptGetting Started

Calculate a simple total

TypeScript: Multiply a unit price by a quantity, then add a delivery fee.

TypeScript✓ Tested
PowerShellGetting Started

Calculate a simple total

PowerShell: Calculate a simple total using PowerShell 7.

PowerShell✓ Tested
C++Getting Started

Calculate a simple total

C++: Multiply a unit price by a quantity, then add a delivery fee.

C++✓ Tested
CGetting Started

Calculate a simple total

C: Multiply a unit price by a quantity, then add a delivery fee.

C✓ Tested
CSmall algorithms & bit operations

Calculate a small factorial iteratively

C: Multiply a bounded sequence using an unsigned accumulator.

C✓ Tested
GoGetting Started

Calculate a subtotal

Calculate a subtotal using a complete Go program with explicit sample inputs.

Go✓ Tested
SQLGetting Started

Calculate a total for each group

SQL: Group nonmissing categories and calculate separate totals.

SQL✓ Tested
SQL ServerGetting Started

Calculate a total for each group

SQL Server: Group nonmissing categories and calculate separate totals.

SQL Server✓ Tested
PostgresGetting Started

Calculate a total for each group

Postgres: Group nonmissing categories and calculate separate totals.

Postgres✓ Tested
SQLiteGetting Started

Calculate a total for each group

SQLite: Group nonmissing categories and calculate separate totals.

SQLite✓ Tested
C++Numeric parsing & calculations

Calculate a two-dimensional vector length

C++: hypot avoids unnecessary intermediate overflow in the sum of squares.

C++✓ Tested