/******************************************************/ /* Introduction to Programming */ /* By Dr. ANTF */ /* www.antf.net */ /* Copyright 2015 */ /* */ /* C# 314 - Problem 13: Reverse Prime (b) */ /******************************************************/ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DOS { class Program { static void Main(string[] args) { int num1, num2, rev, temp, j; Console.Write("Please enter the first number: "); num1 = int.Parse(Console.ReadLine()); Console.Write("Please enter the second number: "); num2 = int.Parse(Console.ReadLine()); //check the order of the numbers if(num1 > num2) { //swap the numbers int num3; num3 = num1; num1 = num2; num2 = num3; } Console.WriteLine("\n"); for (int i = num1; i < num2; i++) { //find the reverse of i temp = i; rev = 0; while(temp != 0) { rev = (rev * 10) + (temp % 10); temp = temp / 10; } //check if rev is prime for(j=2; j