Files
OOP_Git_Training/Git_Practice/Git_Practice.cpp
2018-03-09 00:16:00 +08:00

30 lines
431 B
C++
Executable File

#include "stdafx.h"
#include <string>
#include <iostream>
using namespace System;
bool Guess(int number)
{
static int target = -1;
if (target == -1)
{
Random r;
target = r.Next() % 100 + 1;
}
if (number == target)return true;
return false;
}
int main(array<System::String^>^ args)
{
int guess;
do
{
std::cin >> guess;
}
while (!Guess(guess));
return 0;
}