#include <iostream>
#include <plog/log.h>
#include <cstdlib>
int sayil()
{
LOGD << "sayi alindi";
int x;
std::cout << "bir sayi gir:";
std::cin >> x;
return x;
}
int main()
{
plog::init(plog::debug, "log.txt");
LOGD << "ilk sayi alindi";
srand(time(NULL));
int x;
x = rand() % 10 + 1;
int y = { sayil() };
while (y != x)
{
if (y < x)
{
LOGD << "sorusturma yapildi tekrardan deger aliniyor";
std::cout << "yukselt acik:";
std::cin >> y;
exit;
}
else if (y > x)
{
LOGD << "sorusturma yapildi tekrardan deger aliniyor";
std::cout << "yavas birader";
std::cin >> y;
exit;
}
exit;
}
LOGD << "sonuca basari ile ulasildi";
std::cout << "dogru bildniz!";
Sleep(3000);
return 0;
}