Final Capstone Lambda Expressions Project

Hard Lambda Expressions PRO
🔒 Login to Unlock

Problem Statement

Write a C++ program implementing a data pipeline processor utilizing multiple advanced lambda features (captures, mutable state, generic types, and STL predicates) to filter, scale, and aggregate transaction streams.

Input Format

Scale factor F, followed by N transaction amounts.

Output Format

Print scaled and filtered transactions, followed by accumulated total sum formatted to 2 decimal places.

Constraints

1 <= N  0

Sample Input

2.0
5
10.5 -5.0 20.0 30.5 -10.0

Sample Output

Scaled: 21.00 40.00 61.00
Total: 122.00

Explanation

Capstone project integrating mutable state tracking, capture scopes, generic auto parameters, and STL algorithm lambdas for full pipeline data processing.

Starter Code

#include <iostream>
#include <vector>
#include <algorithm>
#include <iomanip>

int main() {
    double factor;
    int n;
    if (std::cin >> factor >> n) {
        std::vector<double> tx(n);
        for (int i = 0; i < n; i++) std::cin >> tx[i];

        // Implement pipeline filtering, scaling using lambdas, and aggregation here

    }
    return 0;
}

Limits

  • Time Limit: 1s
  • Memory Limit: 256MB

Embedded C Programming

Updated: March 15, 2026
Intermediate

Embedded systems rely on efficient low-level programming to interact directly with hardware. In this course, you will learn how to write practical Embedded C programs used in real microcontroller-based systems. Rather than focusing only on theory, this course follows a practice-driven approach. Each lesson includes hands-on coding exercises that simulate real firmware development tasks used