This is a preview
This playground version isn't public and is work in progress.
C++
The remaining sections are not ready yet, only some code snippets and tutorial links are provided.
Checking the sample code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <iostream>
#include <bitset>
using namespace std;
int main()
{
string m;
// getline(cin, m);
m = "CG";
string c[2] = {"00", "0"};
string b;
for (auto & ch: m)
b += bitset<7>(ch).to_string();
string a;
a += c[b[0] - '0'] + " 0";
for (int i = 1; i < b.length(); i++) {
if (b[i] == b[i - 1])
a += "0";
else
a += " " + c[b[i] - '0'] + " 0";
}
// cerr << "Debug messages..." << endl;
cout << a << endl;
}
Enter to Rename, Shift+Enter to Preview
Looking at the syntax
- TODO
Other characteristics
- TODO
Resources to check
Coming next...
After the C++ section, we can go forward to D :-), or we can go backwards to C. U'll c which 1 I chose...
Open Source Your Knowledge: become a Contributor and help others learn. Create New Content