Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <iostream>
- using namespace std;
- int main()
- {
- setlocale(LC_ALL, "RUS");
- int k;
- cin >> k;
- while (k != 0){
- if (k % 3 == 0){
- cout << "Прямо ";
- }else{
- if (k % 3 == 1){
- cout << "Влево ";
- } else{
- if (k % 3 == 2){
- cout << "Вправо ";
- }
- }
- }
- k = k / 3;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement