Advertisement
Guest User

Untitled

a guest
Jan 17th, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. /*
  2. * Created by SharpDevelop.
  3. * User: 10.A-I
  4. * Date: 2019.01.14.
  5. * Time: 9:29
  6. *
  7. * To change this template use Tools | Options | Coding | Edit Standard Headers.
  8. */
  9. using System;
  10.  
  11. namespace binaris_atvaltas_decimalisra
  12. {
  13. class Program
  14. {
  15. public static void Main(string[] args)
  16. {
  17. Console.WriteLine("Adj meg egy bináris számot:");
  18. Console.WriteLine();
  19. string szam= Console.ReadLine();
  20.  
  21.  
  22. string szam2 = Convert.ToInt32(szam,2).ToString();
  23.  
  24. Console.WriteLine("---------------------------");
  25. Console.WriteLine("Ez a szám decimálisan: {0}",szam2);
  26. Console.ReadKey(true);
  27. }
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement