Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace TestFora
- {
- class Program
- {
- static void Main(string[] args)
- {
- Program p2 = new Program();
- p2.Test();
- Console.ReadLine();
- }
- public bool[] CheckWordRangeOfAscii(int rangeForm, int rangeTo, int[] valueOfArray)
- {
- bool[] temp = new bool[valueOfArray.Length];
- for (int i = 0; i < valueOfArray.Length; i++)
- {
- if (valueOfArray[i] >= rangeForm || valueOfArray[i] <= rangeTo)
- {
- temp[i] = true;
- }
- else if (valueOfArray[i] < rangeForm || valueOfArray[i] > rangeTo)
- {
- temp[i] = false;
- }
- }
- return temp;
- }
- public void Test()
- {
- int[] tablica = { 10,20,30,405,60};
- bool[] wartosc = CheckWordRangeOfAscii(23, 40, tablica);
- for(int i =0; i<wartosc.Length; i++ )
- {
- Console.WriteLine(wartosc[i]);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment