C-Sharp

28
1740 reads

February 8, 2013

parsing


ask user to enter a number.if it's a number,print parsing was successful ,if not raise an exception and print to user Parsing failed.

169
3471 reads

February 8, 2013

Square root


ask user to enter a number to calculate its square root.if negative number , throw an ArgumentOutOfRangeException then print message to user to tell him what mistakes were occurred to correct them.

162
2600 reads

February 8, 2013

convert string to int


a program asks user to enter a number. convert input from user (string)to integer .then tell user if the conversion occurred correctly or not .

99
1743 reads

February 6, 2013

check neighbors


* write a method that checks if the element at given position in given array of integer
* is bigger than its two neighbors (When such exist).
* Examples :
* Array size : 5

53
1786 reads

February 6, 2013

Counter


* write a method that counts how many times a given number appears in given array of given size.write a test program to check if the method is working correctly
* Examples
* Array size : 5

203
3796 reads

February 6, 2013

Last Digit


* write a method that return the last digit of given integer as an English word
* Examples :
* 512 --> Two
* 1025 --> Five

35
1778 reads

February 5, 2013

predict sign


* write a program that check the sign of the result of product of 3 numbers without calculating the result
* you will learn how to implement nested if statement

201
3231 reads

February 5, 2013

from digit to English corresponding


Write program that asks for a digit and depending on the input shows the name of that digit (in English) using a switch statement.
you will learn how to implement switch statement.

223
3796 reads

February 5, 2013

greatest number


finds the greatest number of given 5 integers.
you will learn how to use nested if statement and functions

23
1988 reads

February 5, 2013

Power


given base and power,this example calculate the value of base^n that is defined as
result=base^n =base*base*base*... for n times
Example : 2^3=2*2*2=8