Advertisement
ranisalt

Exemplo If-Else 5

Dec 28th, 2012
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.19 KB | None | 0 0
  1. int x = Convert.ToInt32(Console.ReadLine());
  2. if (x > 0)
  3. {
  4.     Console.WriteLine("{0} é um número positivo!", x);
  5. }
  6. else
  7. {
  8.     Console.WriteLine("{0} é um número neutro ou negativo!", x);
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement