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 Factorisation
- {
- class Factorisation
- {
- static void Main(string[] args)
- {
- int[] primeArray = { 2, 3, 5, 7, 11 };
- Console.Write("Enter number: ");
- int n = int.Parse(Console.ReadLine());
- for (int i = 0; i < primeArray.Length; i++)
- {
- if (n % primeArray[i] == 0)
- {
- Console.Write(primeArray[i] + " ");
- }
- }
- Console.ReadKey(true);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement