Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("Enter two Numbers");
- int l, u,x,i;
- l = Convert.ToInt16(Console.ReadLine());
- u = Convert.ToInt16(Console.ReadLine());
- for ( x = l+1; x <= u-1; x++)
- {
- for (i=2; i<x; i++)
- {
- if(x%i==0)
- {
- break;
- }
- }
- if(i == x)
- {
- Console.Write(i + "\t");
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment