Help me to write a code of this Idk how I write a code that will work out - C#