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 ConsoleApplication4
- {
- class Program
- {
- static void Main(string[] args)
- {
- int maskSize = 4 + 1;
- int mask = 1 << maskSize;
- mask -= 1;// when we receive mask - 1 and mask was 10000 the result is 1111 that is why we have to add +1 in the beggining
- Console.WriteLine(mask);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment