Last active
December 13, 2021 18:33
-
-
Save Abubakr0904/147d6bf2e8589aba79c7b290efb8526e to your computer and use it in GitHub Desktop.
41-masala
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) | |
| { | |
| var son = int.Parse(Console.ReadLine()); | |
| for(int i = 2; i <= Math.Sqrt(son) + 1; i++) | |
| { | |
| if(son % i == 0) | |
| { | |
| i = 1; | |
| son++; | |
| } | |
| } | |
| Console.WriteLine($"{son}"); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Great bro