Assignment1-1
Assignment1-1
Assignment-1
Assignment Submission Guidelines
Last Date of Submission: 10-Feb-2025
The output of all programs must be included.
The assignment file must contain an index.
1. Implement bitwise AND, OR, XOR, and NOT operations on two integers.
2. Write a program to find the maximum of three numbers using the ternary operator
3. Write a program to display the number of days in a given month using switch-
case.
4. Write a program to check if a year is a leap year or not, using if-else.
5. Write a program to find the sum of digits of a number using a loop.
6. Reverse a given integer using a loop.
7. Print all prime numbers within a given range using nested loops.
8. Write a program to find the first even number in an array using a loop with break.
9. Write a program to print all odd numbers between 1 and 50 using continue.
10. Print the following patterns using nested loops:
*
**
***
****