Язык C++. #include <iostream> #include <stdlib.h> using namespace std; int main () { int b = 0; int c = 1; int min = 1; int max = 10; srand ( time(NULL) ); int n = min + rand() % (max - min); do{ cout << "Guess the number: " << endl; cin >> b; ++c; if (c > 3) return 3; } while (b != n); cout << "You are right!" << endl; }
0,0(0 оценок)
Полный доступ
Позволит учиться лучше и быстрее. Неограниченный доступ к базе и ответам от экспертов и ai-bota
Оформи подписку