Skip to content

Commit

Permalink
add endl
Browse files Browse the repository at this point in the history
  • Loading branch information
usernaimandrey committed Feb 22, 2024
1 parent 2248147 commit 8aedf96
Show file tree
Hide file tree
Showing 39 changed files with 39 additions and 39 deletions.
2 changes: 1 addition & 1 deletion modules/10-basics/50-testing/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

int main() {
// BEGIN
std::cout << 420262531;
std::cout << 420262531 << std::endl;
// END
return 0;
}
2 changes: 1 addition & 1 deletion modules/10-basics/50-testing/test.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "test_helper.h"

TEST_CASE("testing solution") {
std::string expected = "420262531";
std::string expected = "420262531\n";
std::string actual = get_output(sizeof(expected));

CHECK(actual == expected);
Expand Down
2 changes: 1 addition & 1 deletion modules/10-basics/60-syntax-error/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

int main() {
// BEGIN
std::cout << "What Is Dead May Never Die";
std::cout << "What Is Dead May Never Die" << std::endl;
// END
return 0;
}
2 changes: 1 addition & 1 deletion modules/10-basics/60-syntax-error/test.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "test_helper.h"

TEST_CASE("testing solution") {
std::string expected = "What Is Dead May Never Die";
std::string expected = "What Is Dead May Never Die\n";
std::string actual = get_output(sizeof(expected));

CHECK(actual == expected);
Expand Down
2 changes: 1 addition & 1 deletion modules/20-arithmetics/10-basics/description.ru.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ theory: |
</pre>
instructions: |
Выведите на экран результат деления числа *81* на *9*.
Выведите на экран результат деления числа *81* на *9*. Не забудьте сделать перевод строки.
tips:
- |
Expand Down
2 changes: 1 addition & 1 deletion modules/20-arithmetics/10-basics/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

int main() {
// BEGIN
std::cout << (81 / 9);
std::cout << (81 / 9) << std::endl;
// END
return 0;
}
2 changes: 1 addition & 1 deletion modules/20-arithmetics/10-basics/test.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "test_helper.h"

TEST_CASE("testing solution") {
std::string expected = "9";
std::string expected = "9\n";
std::string actual = get_output(sizeof(expected));

CHECK(actual == expected);
Expand Down
2 changes: 1 addition & 1 deletion modules/20-arithmetics/20-operators/description.ru.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ theory: |
Это немного может сбить с толку, потому что *-3* — это одновременно и число само по себе, и оператор с операндом, но у языков программирования такая структура.
instructions: |
Напишите программу, которая посчитает разность между числами `6` и `-81` и выведет ответ на экран.
Напишите программу, которая посчитает разность между числами `6` и `-81` и выведет ответ на экран. Не забудьте сделать перевод строки.
definitions:
- name: "Арифметическая операция"
Expand Down
2 changes: 1 addition & 1 deletion modules/20-arithmetics/20-operators/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

int main() {
// BEGIN
std::cout << (6 - (- 81));
std::cout << (6 - (- 81)) << std::endl;
// END
return 0;
}
2 changes: 1 addition & 1 deletion modules/20-arithmetics/20-operators/test.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "test_helper.h"

TEST_CASE("testing solution") {
std::string expected = "87";
std::string expected = "87\n";
std::string actual = get_output(sizeof(expected));

CHECK(actual == expected);
Expand Down
2 changes: 1 addition & 1 deletion modules/20-arithmetics/40-composition/description.ru.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ instructions: |
Обратите внимание, что программа производит арифметические вычисления в правильном порядке: сначала деление и умножение, потом сложение и вычитание. Иногда этот порядок нужно изменить — об этом следующий урок.
Также обратите внимание на то, что в C++ по умолчанию используется целочисленное деление, `3 / 2` будет `1`.
Также обратите внимание на то, что в C++ по умолчанию используется целочисленное деление, `3 / 2` будет `1`. В выводе не забудьте сделать перевод строки.
2 changes: 1 addition & 1 deletion modules/20-arithmetics/40-composition/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

int main() {
// BEGIN
std::cout << (8 / 2 + 5 - -3 / 2);
std::cout << (8 / 2 + 5 - -3 / 2) << std::endl;
// END
return 0;
}
2 changes: 1 addition & 1 deletion modules/20-arithmetics/40-composition/test.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "test_helper.h"

TEST_CASE("testing solution") {
std::string expected = "10";
std::string expected = "10\n";
std::string actual = get_output(sizeof(expected));

CHECK(actual == expected);
Expand Down
2 changes: 1 addition & 1 deletion modules/20-arithmetics/50-priority/description.ru.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ theory: |
instructions: |
Дано выражение `70 * 3 + 4 / 8 + 2`.
Расставьте скобки так, чтобы оба сложения (`3 + 4` и `8 + 2`) высчитывались в первую очередь. Выведите результат на экран.
Расставьте скобки так, чтобы оба сложения (`3 + 4` и `8 + 2`) высчитывались в первую очередь. Выведите результат на экран. Не забудьте сделать перевод строки.
2 changes: 1 addition & 1 deletion modules/20-arithmetics/50-priority/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

int main() {
// BEGIN
std::cout << (70 * (3 + 4) / (8 + 2));
std::cout << (70 * (3 + 4) / (8 + 2)) << std::endl;
// END
return 0;
}
2 changes: 1 addition & 1 deletion modules/20-arithmetics/50-priority/test.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "test_helper.h"

TEST_CASE("testing solution") {
std::string expected = "49";
std::string expected = "49\n";
std::string actual = get_output(sizeof(expected));

CHECK(actual == expected);
Expand Down
2 changes: 1 addition & 1 deletion modules/20-arithmetics/60-float/description.ru.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ theory: |
Для нас, как для разработчиков, важно понимать, что операции с плавающими числами неточны (эту точность можно регулировать), а значит при решении задач, связанных с подобными числами, необходимо прибегать к специальным трюкам, которые позволяют добиться необходимой точности.
instructions: |
Вычислите и выведите на экран произведение двух чисел: *0.39* и *0.22*
Вычислите и выведите на экран произведение двух чисел: *0.39* и *0.22*. Не забудьте сделать перевод строки.
tips:
- |
Expand Down
2 changes: 1 addition & 1 deletion modules/20-arithmetics/60-float/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

int main() {
// BEGIN
std::cout << (0.39 * 0.22);
std::cout << (0.39 * 0.22) << std::endl;
// END
return 0;
}
2 changes: 1 addition & 1 deletion modules/20-arithmetics/60-float/test.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "test_helper.h"

TEST_CASE("testing solution") {
std::string expected = "0.0858";
std::string expected = "0.0858\n";
std::string actual = get_output(sizeof(expected));

CHECK(actual == expected);
Expand Down
2 changes: 1 addition & 1 deletion modules/20-arithmetics/70-codestyle/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

int main() {
// BEGIN
std::cout << ((5 + 2) - (3 * 7));
std::cout << ((5 + 2) - (3 * 7)) << std::endl;
// END
return 0;
}
2 changes: 1 addition & 1 deletion modules/20-arithmetics/70-codestyle/test.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "test_helper.h"

TEST_CASE("testing solution") {
std::string expected = "-14";
std::string expected = "-14\n";
std::string actual = get_output(sizeof(expected));

CHECK(actual == expected);
Expand Down
2 changes: 1 addition & 1 deletion modules/30-variables/10-definition/description.ru.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ theory: |
Эти две формы функционируют почти одинаково, но обычно предпочтительнее прямая форма.
instructions: |
Внутри функции `main` определите переменную типа `int`, присвойте ей значение 42 и выведите на экран.
Внутри функции `main` определите переменную типа `int`, присвойте ей значение 42 и выведите на экран. Не забудьте сделать перевод строки.
tips:
- |
Expand Down
2 changes: 1 addition & 1 deletion modules/30-variables/10-definition/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
int main() {
// BEGIN
int num { 42 };
std::cout << num;
std::cout << num << std::endl;
// END
return 0;
}
2 changes: 1 addition & 1 deletion modules/30-variables/10-definition/test.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "test_helper.h"

TEST_CASE("testing solution") {
std::string expected = "42";
std::string expected = "42\n";
std::string actual = get_output(sizeof(expected));

CHECK(actual == expected);
Expand Down
2 changes: 1 addition & 1 deletion modules/30-variables/20-change/description.ru.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ theory: |
instructions: |
В коде определена переменная со значением `10`. Переопределите значение этой переменной и присвойте ей значение на единицу больше.
В коде определена переменная со значением `10`. Переопределите значение этой переменной и присвойте ей значение на единицу больше. Не забудьте сделать перевод строки.
tips:
- |
Expand Down
2 changes: 1 addition & 1 deletion modules/30-variables/20-change/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ int main() {
// BEGIN
num += 1;
// END
std::cout << num;
std::cout << num << std::endl;
return 0;
}
2 changes: 1 addition & 1 deletion modules/30-variables/20-change/test.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "test_helper.h"

TEST_CASE("testing solution") {
std::string expected = "11";
std::string expected = "11\n";
std::string actual = get_output(sizeof(expected));

CHECK(actual == expected);
Expand Down
2 changes: 1 addition & 1 deletion modules/40-data-types/30-logic-type/description.ru.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ theory: |
```
instructions: |
Допишите программу, которая принимает в качестве аргумента командной строки число и определяет его четность. Результат сохраните в переменной типа `bool` и выведите на экран.
Допишите программу, которая принимает в качестве аргумента командной строки число и определяет его четность. Результат сохраните в переменной типа `bool` и выведите на экран. Не забудьте сделать перевод строки.
tips:
- |
Expand Down
2 changes: 1 addition & 1 deletion modules/40-data-types/30-logic-type/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ int main(int argc, char *argv[]) {
auto number { atol(argv[1]) };
// BEGIN
bool is_even = (number % 2) == 0;
std::cout << is_even;
std::cout << is_even << std::endl;
// END
return 0;
}
2 changes: 1 addition & 1 deletion modules/40-data-types/30-logic-type/test.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "test_helper.h"

TEST_CASE("testing solution") {
std::string expected = "1";
std::string expected = "1\n";
std::string actual = get_output(sizeof(expected), "4");

CHECK(actual == expected);
Expand Down
2 changes: 1 addition & 1 deletion modules/40-data-types/40-char-type/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
int main() {
// BEGIN
char symbol { 'U' };
std::cout << symbol;
std::cout << symbol << std::endl;
return 0;
// END
}
2 changes: 1 addition & 1 deletion modules/40-data-types/40-char-type/test.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "test_helper.h"

TEST_CASE("testing solution") {
std::string expected = "U";
std::string expected = "U\n";
std::string actual = get_output(sizeof(expected));

CHECK(actual == expected);
Expand Down
2 changes: 1 addition & 1 deletion modules/40-data-types/50-type-casting/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ int main() {
float f_rubles_count {
f_dollars_count * static_cast<float>(rubles_per_dollar)
};
std::cout << f_rubles_count;
std::cout << f_rubles_count << std::endl;
// END
}
2 changes: 1 addition & 1 deletion modules/40-data-types/50-type-casting/test.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "test_helper.h"

TEST_CASE("testing solution") {
std::string expected = "165\n9900";
std::string expected = "165\n9900\n";
std::string actual = get_output(sizeof(expected));

CHECK(actual == expected);
Expand Down
2 changes: 1 addition & 1 deletion modules/40-data-types/60-type-alias/description.ru.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ theory: |
instructions: |
В этом задании мы вспомним школьный курс физики. Напишите программу, которая рассчитывает максимальную мощность, на которую рассчитана бытовая розетка и выводит ее в консоль. Мощность рассчитывается по формуле: сила тока умноженная на напряжение. Сила тока измеряется в Ампер и равна 16, напряжение в Вольт, мощность в Ватт. Для определения величин используйте псевдонимы.
В этом задании мы вспомним школьный курс физики. Напишите программу, которая рассчитывает максимальную мощность, на которую рассчитана бытовая розетка и выводит ее в консоль. Мощность рассчитывается по формуле: сила тока умноженная на напряжение. Сила тока измеряется в Ампер и равна 16, напряжение в Вольт, мощность в Ватт. Для определения величин используйте псевдонимы. Не забудьте сделать перевод строки.
tips:
- |
Expand Down
2 changes: 1 addition & 1 deletion modules/40-data-types/60-type-alias/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ int main() {
amperу amperage { 16 };

watt power { voltage * amperage };
std::cout << power;
std::cout << power << std::endl;
// END
}
2 changes: 1 addition & 1 deletion modules/40-data-types/60-type-alias/test.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "test_helper.h"

TEST_CASE("testing solution") {
std::string expected = "3520";
std::string expected = "3520\n";
std::string actual = get_output(sizeof(expected));

CHECK(actual == expected);
Expand Down
2 changes: 1 addition & 1 deletion modules/50-functions/40-function-prototypes/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ int GetLength(std::string);

int main() {
int length = GetLength("Code Basics");
std::cout << length;
std::cout << length << std::endl;
return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion modules/50-functions/40-function-prototypes/test.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "test_helper.h"

TEST_CASE("testing prototipe function") {
std::string expected = "11";
std::string expected = "11\n";
std::string actual = get_output(sizeof(expected));

CHECK(actual == expected);
Expand Down

0 comments on commit 8aedf96

Please sign in to comment.