AYUDAAAAAA, No encuentro el error
Publicado por MaxToys (4 intervenciones) el 09/02/2017 00:17:20
ayuda D: es un algoritmo de adivinar el numero
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication13
{
class Program
{
static void Main(string[] args)
{
Random Aleatorio = new Random();
int numero, intentos, usuario, repetir;
do
{
numero = Convert.ToInt32(Console.ReadLine());
numero = Aleatorio.Next(1); 11);
Console.WriteLine("Intenta adivinar el numero del 1 al 10");
for (intentos = 1; intentos <= 5; intentos++) ;
{
Console.WriteLine("Intento Numero 1 de 5");
usuario = int.Parse(Console.ReadLine());
Console.Clear();
if (usuario == numero)
{
Console.Write("Felicidades, has adivinado el numero");
}
else
{
Console.WriteLine("Aun no, Sigue intentando. Te quedan " + intentos + "intentos");
}
}
}
}
Valora esta pregunta
-1