Write C# code to declare a variable to store the age of a person. Then the output of the program is as an example shown below



Download 13.25 Kb.
Date27.02.2021
Size13.25 Kb.
#55938
Revision 3

  1. Write a method FindMax that takes two integer values and returns the larger of the two, use it in application.

  2. Write C# code to declare a variable to store the age of a person. Then the output of the program is as an example shown below:

You are 20 years old.
  1. Write a C# program to detect key presses. If the user pressed number keys( from 0 to 9), the program will display the number that is pressed, otherwise the program will show "Not allowed".

  2. Write C# code to produce the output shown below:


*******

******


*****

****


***

**

*


5. Write C# code to print the following pattern:


1******

12*****


123****

1234***


12345**

123456*


1234567
  1. Write C# program to print the table of characters that are equivalent to the Ascii codes from 1 to 122.

  2. A two-dimensional array stores values in rows and columns. By using two-dimensional array, write C# program to display a table of numbers


  3. you are about to write C# program to display a matrix as shown below. The diagonal of the matrix fills with 0s. The lower side fills will -1s and the upper side fills with 1s.




Download 13.25 Kb.

Share with your friends:




The database is protected by copyright ©ininet.org 2024
send message

    Main page