#include <iostream>
#include <ctime>
#include <cstdlib>
using namespace std;
int main()
{
int a;
srand (time (NULL));
int x = rand () % 101;
cout << “te doy un número del 0 al 100 adivinalo” << endl;
cin >> a;
while (a!=x)
{
if (a<x)
{
cout << “muy alto, intentalo de nuevo” << endl;
cin >> a;
}
if (a>x)
{
cout << “muy bajo, intentalo de nuevo” << endl;
cin >> a;
}
if (a=x)
{
cout << ” yeii le atinaste es ese!” << endl;
}
}
return 0;
}
Pick a number by ferny580 is licensed under a Creative Commons Attribution 4.0 International License.