Advertisement
ranisalt

Exemplo If Shortcut

Dec 29th, 2012
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.21 KB | None | 0 0
  1. Console.WriteLine("Informe as 2 notas do aluno");
  2. float n1 = Convert.ToSingle(Console.ReadLine()), n2 = Convert.ToSingle(Console.ReadLine());
  3. Console.WriteLine((n1 + n2) / 2.0 >= 7.0 ? "Aprovado" : "Reprovado");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement