A. Variables
-
Write a program to store your name and age in variables and print them.
-
Write a program to swap two numbers using a temporary variable.
-
Write a program to take two numbers as input and print their sum.
B. Arithmetic Operators
-
Write a program to calculate the area of a circle.
-
Write a program to find the quotient and remainder of two numbers.
-
Write a program to calculate simple interest.
-
Write a program to convert temperature from Celsius to Fahrenheit.
C. Comparison Operators
-
Write a program to compare two numbers and print the greater one.
-
Write a program to check whether a number is equal to 100.
-
Write a program to check if a number is positive, negative, or zero.
D. Assignment Operators
-
Write a program that increases a variable value by 10 using
+=. -
Write a program to multiply a variable by 5 using
*=and print it.
E. Logical Operators
-
Write a program to check if a number is between 10 and 50.
-
Write a program to check if a number is divisible by 3 and 5.
-
Write a program to check if a student is eligible for a scholarship (marks > 85 AND attendance > 75).
F. Only if Statements
-
Write a program to check if a number is even.
-
Write a program to print "Adult" if age is 18 or more.
-
Write a program to print "Passed" if marks are ≥ 40.
-
Write a program to print "Leap Year" if the year is divisible by 4.


0 Comments:
Post a Comment