🚀 Level Up Your Coding – Practice Zone

CodeKnolls Academy

These programs are provided only for practice purposes.

❌ No shortcuts ❌ No copying ✅ Just pure logic building

Attempt all questions honestly, write the programs by yourself, and track your improvement daily 📈🔥

Programming Language: Java

🧩 Question 1

📘 Swap Two Numbers Without Using a Third Variable

Write a Java program to swap two numbers without using a temporary variable.

Pseudo Code:
Read a
Read b
a = a + b
b = a - b
a = a - b
Print a, b
🧩 Question 2

📘 Find the Area of a Circle

Write a Java program to calculate the area of a circle using the given radius.

Formula:
Area = π × r × r

Note: π = 3.14
🧩 Question 3

📘 Find the Area of a Rectangle

Write a Java program to calculate the area of a rectangle.

Formula:
Area = length × breadth
🧩 Question 4

📘 Find the Area of a Square

Write a Java program to calculate the area of a square.

Formula:
Area = side × side
🧩 Question 5

📘 Convert Temperature from Fahrenheit to Centigrade

Write a Java program to convert temperature from Fahrenheit to Centigrade.

Formula:
Centigrade = (Fahrenheit - 32) × 5 / 9
🧩 Question 6

📘 Calculate the Gross Salary of an Employee

Write a Java program to calculate the gross salary of an employee based on the following details.

Pseudo Code:
basicSalary = 8600

DA = basicSalary × 20 / 100
HRA = basicSalary × 10 / 100
CTA = basicSalary × 12 / 100

grossSalary = basicSalary + DA + HRA + CTA
Print grossSalary