Контрольные примеры 1. Ввод
console console \q
Вывод
Input: console Output: console
Analysis ("~" - comments for replacement):
Writing result...
Success!
2. Ввод console console // start
#include <iostream>
/* Below is the test of c-style comments */ /*
test of ignoring // cpp-style comments in c-style */
using namespace std; int main() {
// the test of comment with null length
//
// test of cpp-style comment // inside another cpp-style comment //
cout << " 9 // 2 =
" << 9 / 2 << endl; // test of ingoring // in strings return 0;
} // end \q
Вывод
Input: console Output: console
Analysis ("~" - comments for replacement):
// start
~~~~~~~
#include <iostream>
/* Below is the test of c-style comments */ /*
test of ignoring // cpp-style comments in c-style */
using namespace std; int main() {
// the test of comment with null length
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
~
// test of cpp-style comment // inside another cpp-style comment //
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cout << " 9 // 2 =
" << 9 / 2 << endl; // test of ingoring // in strings
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
return 0; } // end
~~~~~
Writing result...
/* start */ #include <iostream>
/* Below is the test of c-style comments */ /*