Friday, December 14, 2012

Programming C#

a) Write an employment that reads a non-negative integer from an input conversation and computes and prints its factorial atmospheric static void Main(string[] args) { int i, n, fac = 1; string s; Console.WriteLine( revel enter any figure to find its factorial(0 to 19):\n); s = Console.ReadLine(); n = Int32.Parse(s); for (i = 1; i <= n; i++) { fac = fac * i; } Console.WriteLine(\nThe factorial of {0} is {1}., n, fac); Console.Read(); } } } b) A palindrome is a do or text phrase that reads the same backwards as forwards e.g each of the following five-digit integers are palindromes 12321; 55555; 45554; 11611. Write an application that reads in a five-digit integer and determine whether it is a palindrome. static void Main(string[] args) { Console.Write( Enter any fare: ); int num = int.Parse(Console.ReadLine()); int rev = 0, n, paradoxical sleep; n = num; while (num != 0) { rem = num % 10; rev = rev * 10 + rem; num = num / 10; } Console.WriteLine( \n buffer number is + n); Console.
Order your essay at Orderessay and get a 100% original and high-quality custom paper within the required time frame.
WriteLine( \n Reversed number is + rev); if (n == rev) { Console.WriteLine(\n Original number = Reversed number.); Console.WriteLine(\n So, {0} is a Palindrome , n); Console.ReadLine(); } else { Console.WriteLine(\n Original number != Reversed number.); Console.WriteLine(\n So, {0} is not a Palindrome , n); Console.ReadLine(); } } } } c) An application to determine whether anyƂ of several department lineage customers has exceeded their... If you want to get a full essay, order it on our website: Orderessay

Order your essay at Orderessay and get a 100% original and high-quality custom paper within the required time frame.

No comments:

Post a Comment