1. Check number is even or odd:
2. Compare two passwords entered by user.
PROGRAM:
3. Write condition if person age >= 18 is eligible to vote:
PROGRAM:
4. Use logical AND to check:
▪️User is logged in
▪️User is admin Then allow dashboard access.
PROGRAM:
OUTPUT:
5.calculates total cart amount:
PROGRAM:
OUTPUT:
6. greet a user by name:
PROGRAM:
OUTPUT:
7. convert Celsius to Fahrenheit:
PROGRAM:
OUTPUT:
8. returns the largest of two numbers:
PROGRAM:
OUTPUT:
9. Check user role:
PROGRAM:
OUTPUT:
10. Check number is positive, negative, or zero:
PROGRAM:
11. Check a year is leap year:
PROGRAM:
12. Movie ticket pricing:child age below 12->100, adult age above 12->200:
PROGRAM:
OUTPUT:
13. If marks >= 90 Grade A,75→ Grade B else → Fail:
PROGRAM:


























Top comments (0)