Thursday, February 12, 2009

C#

Exercise in C# Programming Language

Write a Console Application using C# Express for the following machine problems:

1. Compare 2 string inputs and count how many letters are the same between the two.

Sample input/output for your program is listed below.

Enter first string : Hello

Enter second string : World

Common Letter Count : 2


2. Write pseudo-code for a program that keeps asking the user to input integers until the user enters zero, and determines and outputs the largest integer.

Sample input/output for your program is listed below.

Please input an integer, 0 to end: 6

Please input an integer, 0 to end: 19

Please input an integer, 0 to end: -4

Please input an integer, 0 to end: 0

The largest integer entered was 19.