0% found this document useful (0 votes)
12 views2 pages

C# 1

Uploaded by

maulikdedunmmm
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views2 pages

C# 1

Uploaded by

maulikdedunmmm
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Subject: Windows Application Development – I

Instructions:
• Create a single project having different forms for each given
question.
• Give appropriate formatting to form and the controls.

1. Write a C# program to display Hello world message on the button click


event.
2. Write a C# program to accept a message from the user in a textbox and
display the entered message on the button click event using MessageBox.
3. Write a C# program to accept a number from the user in a textbox and check
whether the given number is odd or even on the button click event.
4. Write a C# program to accept a number from the user in a textbox and check
whether the given number is positive, negative or zero on the button click
event.
5. Design a calculator to accept two numbers and perform different arithmetic
operations such as addition, subtraction, division and multiplication.
6. Write a C# program to accept three numbers from the user in three different
textboxes and display the largest number on the button click event.
7. Write a C# program to accept marks of three subjects from the user in three
different textboxes and display the total marks and percentage gained on the
button click event.
8. Write a C# program to accept a number from the user in a textbox and print
1 to n on the button click event using a while loop.
9. Write a C# program to accept a number from the user in a textbox and print
1 to n on the button click event using a for loop.
10.Write a C# program to accept a number from the user in a textbox and print
1 to n on the button click event using a do..while loop.
11.Write a C# program to display an array of string values on the button click
event using a foreach loop.
12.Write a C# program to accept a number from the user in a textbox and print
even numbers between 1 to n on the button click event using a while loop.
13.Write a C# program to accept a number from the user in a textbox and print
odd numbers between 1 to n on the button click event using a for loop.
14.Write a C# program to accept a string from the user in a textbox and print
the reverse of the given string on the button click event.
15.Write a C# program to accept a string from the user in a textbox and check
whether the given string is palindrome or not on the button click event.
16.Design a form to accept username and password from the user in two
different textboxes. On the button click event check whether the credentials
are valid or invalid.
17.Write a C# program to accept a number from the user in a textbox and
generate a multiplication table of the given number n on the button click
event using a for loop.

You might also like