Public working demo
Try the workspace before signing in.
This page runs local demo state in your browser: open files, execute the sample, build a preview, then continue into setup when you want to keep a workspace.
Workspace ready
main.cpp
Collaborator editing live
1#include <bits/stdc++.h>
2using namespace std;
3
4int main() {
5 vector<int> scores = {42, 93, 77, 88};
6 int total = accumulate(scores.begin(), scores.end(), 0);
7 int best = *max_element(scores.begin(), scores.end());
8
9 cout << "Best score: " << best << endl;
10 cout << "Average score: " << total / scores.size() << endl;
11 return 0;
12}
Terminal
$ workspace status Public demo ready. Open files, run the sample, or build a preview.