1. Declare two variables: one int and one float.
Assign values to both and print their
sum, sub, mul, div
input output
Enter a number: 3 Sum: 7.4
Enter another number: 4.4 Sub: -1.4
Mul:
Div
2. Declare a bool variable named isPassed. Set it to true and print:
“You have passed: true”
3. Create two string variables: firstName and lastName. Combine them and print the
full name with a space in between.
Input output
Enter first name: Sakib Full name: Sakib Khan
Enter last name: Khan
4. Take 5 integer inputs from the user, calculate the average, and print it.
Input output
4 2
4
5
1
-4
5. Swap two integer variables using a third variable. Show the values before and after
swapping
Input output
Enter a number: 10 Before swap:
Enter another number: -5 X = 10
Y = -5
After swap:
X = -5
Y = 10