Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Modify_Bit
- {
- class Program
- {
- static void Main(string[] args)
- {
- ushort number = ushort.Parse(Console.ReadLine());
- //byte position = byte.Parse(Console.ReadLine());
- //byte bitValue = byte.Parse(Console.ReadLine());
- string byteNumber = Convert.ToString(number, 2);
- for (int i = 0; i < byteNumber.Length; i++)
- {
- Console.Write(byteNumber[i] + " ");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement