Скачиваний:
2
Добавлен:
25.01.2023
Размер:
636.96 Кб
Скачать

Cхемы алгоритмов

9

10

11

12

13

14

15

16

17

Контрольные примеры 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

18

Вывод

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 */ /*

19

Соседние файлы в папке Курсовая про замену комментариев