0
What Is bad there?
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SoloLearn { class Program { static void Main(string[] args) { int yourscore = Convert.ToInt32(Console.ReadLine()); int gun = Convert.ToInt32(Console.ReadLine); string win = "Buy it"; string defeat = "Try again"; if(yourscore / 12 > gun) Console.WriteLine(win); else Console.WriteLine(defeat); } } }
1 Respuesta
+ 1
Both <yourscore> and <gun> are ints, integer division may yield zero, might not be what you expected.
I think you meant to print either <win> or <defeat>.
* So instead of
Console.ReadLine(win);
* Do this instead
Console.WriteLine(win);
Same story with <defeat>.