0% found this document useful (0 votes)
5 views

LAB_DOTNET

The document contains a list of programming tasks in C# that cover a variety of concepts including mathematical calculations, string manipulations, data structures, and object-oriented programming. Each task specifies a different requirement, such as calculating factorials, checking for prime numbers, performing matrix operations, and implementing inheritance. The tasks range from basic operations to more complex implementations involving classes and interfaces.

Uploaded by

jesaboc231
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

LAB_DOTNET

The document contains a list of programming tasks in C# that cover a variety of concepts including mathematical calculations, string manipulations, data structures, and object-oriented programming. Each task specifies a different requirement, such as calculating factorials, checking for prime numbers, performing matrix operations, and implementing inheritance. The tasks range from basic operations to more complex implementations involving classes and interfaces.

Uploaded by

jesaboc231
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Q.1] Write a C# program to calculate the factorial of a given number.

Q.2] Write a C# program to check whether a given number is prime or not.


Q.3] Write a C# program to display all the prime numbers between 1 to 100.
Q.4] Write a C# program to Display all perfect numbers between 1 to 100.
Q.5] Write a C# program to sort an array in ascending and descending order.
Q.6] Write a C# program to calculate the sum of first and last digits of a given number.
Q.7] Write a C# program to check whether the given string is a palindrome or not.
Q.8] Write a C# program to accept one string & a character, find the occurrences of that
character in String using function.
Q.9] Write a C# program to check whether given number is Armstrong or not.
Q.10] Write a C# program to find minimum & maximum element from an array.
Q.11] Write a C# program to accept M x N matrix and perform the following operations:
1. Addition
2. Transpose
Q.12] Write a C# program to accept MXN matrix from a user and calculate sum of diagonal
elements of a matrix.
Q.13] Write a C# program to implement a stack with push and pop operations. Find the top
element of the stack and check if the stack is empty or not.
Q.14] Write a C# program to find the top and bottom element from a given stack. [10M]
Q.15] Write a C# program to accept two numbers from a user, display following menus and
perform the following operations on them using function:
1. Addition
2. Subtraction
3. Multiplication
4. Division
Q.16] Write a C# program to accept the following information of student from a user:
Student Id:
Student Name:
Course Name:
Date of Birth:
The application should display the information of student once the data is entered.
Q.17] Write a C# program to implement multilevel inheritance from the following figure. Accept
and display data for one student.

.
Q.18] Write a C# program to define a class Person with attributes name and birthdate. Drive the
classes Student and Instructor from Person. The Student class has an attribute course and the
Instructor class has an attribute salary. Write the class definitions, constructor and the member
function to display all information.
Q.19] Write a C# program to implement the following multiple inheritance using interface.
Q.20] Write a program to swap three integer and three float numbers using the concept of
Function overloading.
Q.21] Write a C# program to accept two 3 X 3 matrix from a user and perform matrix
multiplication.
Q.22] Write a C# program using a constructor and destructor to display student information
(Name, Age & course).
Q.23] Define an abstract class ArithmeticOperation with an abstract method
PerformOperation().Create two derived classes Addition and Multiplication to
implement the PerformOperation ()method to Addition & Multiplication.

You might also like