Skip to content

Conversation

@Stefan367
Copy link

No description provided.

// zad2
/*char ch;
std::cin >> ch;
if ((ch >= 65 && ch <= 90) || (ch >= 97 && ch <= 122))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Не използвай magic numbers

switch (signal)
{
case 1: std::cout << "Stop!"; break;
case 2: std::cout << "Slow down!"; break;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Идеята беше да се постигне fall through ефект.

// zad7
/*char ch;
std::cin >> ch;
if (ch >= 65 && ch <= 90)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Magic numbers

int day, month;
std::cout << "Date: ";
std::cin >> day >> month;
switch (month)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Добро решение.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants