This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var targetNumber = 0; | |
| var sum = 0; | |
| var index = 1; | |
| while (targetNumber < 4000000) | |
| { | |
| targetNumber = CalculateFibunacci(index); | |
| Console.WriteLine(targetNumber); | |
| if (targetNumber % 2 == 0) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static int CalculateFibunacci(int n) | |
| { | |
| var result = 0; | |
| if (n == 0 || n < 0) { | |
| return 0; | |
| } | |
| else if (n <= 2) | |
| { | |
| return n - 1; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var sum = 0; | |
| for (int i = 1; i < 1000; i++) | |
| { | |
| if (i % 3 == 0 || i % 5 == 0) { | |
| sum += i; | |
| } | |
| } | |
| Console.WriteLine(sum); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //target Illustrator | |
| var doc = app.activeDocument; | |
| var docName = doc.name.replace(/\.[^\.]+$/, ""), | |
| docDir = doc.path != "" ? doc.path : "~"; | |
| var angle = 5, | |
| iterations = 72, | |
| //name of target layer | |
| layerToRotate = "rotateMe", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| public class Program | |
| { | |
| public static void Main(string[] args) | |
| { | |
| Console.WriteLine("Hello, World"); | |
| } | |
| } |