[go: up one dir, main page]

0% found this document useful (0 votes)
5 views4 pages

MCA 362 lab assignment

Download as doc, pdf, or txt
Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1/ 4

LAB ASSIGNMENT RECORD

On

MCA 362
Dot Net using C# Lab

COLLEGE OF COMPUTING SCIENCES AND INFORMATION


TECHNOLOGY
TMU, MORADABAD

Aug 2023 - Jan 2024

Submitted To: Submitted By:

Mr. Vineet Saxena (Student Name)


(Course, Semester, Section)
(University Roll Num)
Lab Assignment No: 1

S.NO PROGRAM NAME PAGE DATE SIGN REMARK


NO
1 WCP to find whether a year is a leap or not.

2 WCP to find the grades of a student according to their scores.

3 WCP to find factorial using for, while, do…While loops.

4 WCP to perform various string operations.

5 WCP to find the largest number among three numbers.

6 WCP to find the maximum and minimum element in array a of size


n.

7 WCP to print Fibonacci series using recursion

8 Write a program to accept the numbers M and N from the user


and print the smallest required number whose sum of all its digits
is equal to N. Also, print the total number of digits present in the
required number. The program should check for the validity of the
inputs and display an appropriate message for invalid input.
Given two positive numbers M and N, such that M is between 100
and 10000 and N is less than 100. Find the smallest integer that is
greater than M and whose digits add up to N. For example, if M =
100 and N = 11, then the smallest integer greater than 100 whose
digits add up to 11 is 119.

Example 1 INPUT : M = 100 N = 11 OUTPUT : The required number


= 119 Total number of digits = 3
Example 2 INPUT : M = 1500 N = 25 OUTPUT : The required
number = 1699 Total number of digits = 4

9 Write a Program in C# to input a number and check whether it is a


Disarium Number or not. Note: A number will be called DISARIUM
if sum of its digits powered with their respective position is equal
to the original number.

For example 135 is a DISARIUM (Workings 11 +32 +53 = 135, some


other DISARIUM are 89, 175, 518 etc)

10 Write a Program in C# to input a number and check whether it is


an Automorphic Number or not. Note: An automorphic number is
a number which is present in the last digit(s) of its square.

Example: 25 is an automorphic number as its square is 625 and 25


is present as the last digits.

11 A smith number is a composite number, the sum of whose digits is


the sum of the digits of its prime factors obtained as a result of
prime factorization (excluding 1). The first few such numbers are 4,
22, 27, 58, 85, 94, 121.....

Example 1. 666 Prime factors are 2, 3, 3 and 37 Sum of the digits


are (6+6+6) = 18 Sum of the digits of the factors 2+3+3+(3+7) = 18
Sample data: Input 94 Output SMITH Number Input 102 Output
NOT SMITH Number

12 A smith number is a composite number, the sum of whose digits is


the sum of the digits of its prime factors obtained as a result of
prime factorization (excluding 1). The first few such numbers are 4,
22, 27, 58, 85, 94, 121..... Example 1. 666 Prime factors are 2, 3, 3
and 37 Sum of the digits are (6+6+6) = 18 Sum of the digits of the
factors 2+3+3+(3+7) = 18 Sample data: Input 94 Output SMITH
Number Input 102 Output NOT SMITH Number

13 Write a C# program to input a number and check whether it is a


NEON number or not.

Note- A number is said to be Neon, if sum of all the digits of the


square of the number is equal to the number itself. For example: 9
is a Neon Number. Square of 9=81 Sum of Digits of square=8 + 1=9

14 Write a C# program for Emrip number. Example: 13 is Emrip


number since 13 and 31 are both prime number, means that
forward and backward of a number will be prime number.

15 A bank intends to design a program to display the denomination of


an input amount, upto 5 digits. The available denominations with
the bank are of rupees 1000,500, 100, 50, 20, 10, 5, 2 and 1. Design
a program to accept the amount from the user and display the
break-up in descending order of denominations. (i,e preference
should be given to the highest denomination available) along with
the total number of notes. [Note: only the denomination used
should be displayed].Example 1: INPUT: 14836 OUTPUT: ONE
FOUR EIGHT THREE SIX DENOMINATION:

1000 X 14 =14000

500 X 1 =500

100 X 3 =300

50 X 1 =50

5 X 1 =5

1 X 1 =1 , EXAMPLE 2: INPUT: 235001 OUTPUT: INVALID AMOUNT


Lab Assignment No: 2
S.NO PROGRAM NAME PAGE DATE SIGN REMARK
NO
1. WWP to find the area of a circle by using required widows
controls.

2. WWP to calculate sum if the digit of number enter by the user.

3. WWP to find reverse of a number entered by the user.

4. WWP to enter any number and check whether the number is


perfect or not.

5. WWP to copy text of one textbox into another.

6. WWP to align text left, right & center in textbox.

7. WWP to clear all textboxes by using for each loop.

8. WWP to implement message box (YES/NO type) on button click


event.

9. WWP to implement login form.

10. WWP to copy list item from one to another.

11. WWP to find which checkbox is checked.

12. WWP to find which radio button is selected in a group.

13. WWP to load image in picture box.

14. WWP to show data in combo box using SqlServer2008.

15. WWP to validate textbox for only string value.

16. WWP to validate textbox for empty value.

17. WWP to validate textbox for integer value.

18. WWP to show data in Datagrid using SqlServer2008.

19. WWP to insert record in database of employees having fields


namely empid, empname and empsalary.

20. WWP to bind the values in dropdown list through coding.

You might also like