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 SHAEBASHIT_BYDEM
- {
- public delegate int F(char, string);
- class Program
- {
- static int Counter(char ch, string str)
- {
- int counter = 0;
- foreach (var e in str)
- {
- if (e == ch) counter++;
- }
- return counter;
- }
- static int IndexOf(char ch, string str)
- {
- char[] array = str.ToCharArray();
- bool flag = false;
- int temp = 0;
- for (int i = 0; i < array.Length - 1; i++)
- {
- if (array[i] == ch)
- {
- flag = true;
- temp = i;
- if (flag) break;
- }
- }
- if (!flag) return -1;
- return temp;
- }
- static void Main(string[] args)
- {
- }
- public static LinkedList<int> Method_Phibonaci(LinkedList<int> list, Func<char,string,int> f)
- {
- list.AddLast(f(list));
- return list;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement