Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- int main()
- {
- int mark{ 4 };
- int num{};
- bool flag{};
- std::cout << "Enter your mark\n";
- std::cin >> mark;
- if (flag == false)
- {
- // false
- }
- else
- {
- // true
- }
- if (num > 0)
- {
- // >0
- }
- else
- {
- if (num < 0)
- {
- // < 0
- }
- else
- {
- // == 0
- }
- }
- if (mark > 3)
- {
- std::cout << "You pass exam!\n";
- if (mark == 5)
- {
- std::cout << "Nice work!Hurra!\n";
- }
- else
- {
- std::cout << "Oh, not bad! :)\n";
- }
- }
- else
- {
- std::cout << "Exam failed! Bad luck! Try again! :(\n";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement