Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <conio.h>
- using namespace std;
- int main() {
- setlocale(LC_ALL, "ru");
- int count = 0;
- char ch;
- while(true) {
- ch = _getch(); // вот эта функция полезная
- if (ch == 'q') return 0;
- else if (ch == 'w') cout << "^" << endl;
- else if (ch == 's') cout << "v" << endl;
- else if (ch == 'a') cout << "<" << endl;
- else if (ch == 'd') cout << ">" << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement