Programming Basics
Practice problems and improve your skills.
THEORY
All theory for this topic
# Programming Basics in Java
This topic builds the foundation for console programs. You will learn how `public class Main` and `main` form the entry point, how `Scanner` reads values from standard input, and how variables of types such as `int`, `long`, `double`, `char`, `boolean`, and `String` store data. You will practice arithmetic operators, integer division and remainder, comparisons, boolean expressions, `if / else if / else`, and exact output with `System.out.println`.
Pay attention to Java's type rules: integer division discards the fractional part, `double` is needed when a fractional result matters, and calculations can overflow if the chosen type is too small. In conditions, check boundary values carefully and order overlapping branches from the most specific threshold to the least specific. A good solution reads only the data described in the statement, computes the result in clear steps, and prints exactly what is required.
YOUR PROGRESS
Topic progress
PRACTICE
Problems
Solve problems from easy to hard and build your skills step by step.
Add 3
Multiply by 3
Rectangle Area
Celsius to Fahrenheit
Even or Odd
Maximum of Two
Inside Inclusive Range
Conditional Discount
Sum of Two Digits
Both Flags Enabled
Average of Three Integers
Minutes to Hours and Minutes
Circle Area
Leap Year
Triangle Existence
Grade by Score
Four-Operation Calculator
Chessboard Cell Color
ATM Banknote Count
Three-Flag Access Rule
Value of Sum
Absolute of Sum
Sign of Sum
Parity Bit of Sum
Last Digit of Sum
Modulo Seven of Sum
Clamp to 100 of Sum
Distance to 50 of Sum
Value of Difference
Absolute of Difference
Sign of Difference
Parity Bit of Difference
Last Digit of Difference
Modulo Seven of Difference
Clamp to 100 of Difference
Distance to 50 of Difference
Value of Product
Absolute of Product
Sign of Product
Parity Bit of Product
Last Digit of Product
Modulo Seven of Product
Clamp to 100 of Product
Distance to 50 of Product
Value of Maximum
Absolute of Maximum
Sign of Maximum
Parity Bit of Maximum
Last Digit of Maximum
Modulo Seven of Maximum
Clamp to 100 of Maximum
Distance to 50 of Maximum
Value of Minimum
Absolute of Minimum
Sign of Minimum
Parity Bit of Minimum
Last Digit of Minimum
Modulo Seven of Minimum
Clamp to 100 of Minimum
Distance to 50 of Minimum
Value of Absolute Difference
Absolute of Absolute Difference
Sign of Absolute Difference
Parity Bit of Absolute Difference
Last Digit of Absolute Difference
Modulo Seven of Absolute Difference
Clamp to 100 of Absolute Difference
Distance to 50 of Absolute Difference
Value of Weighted Sum
Absolute of Weighted Sum
Sign of Weighted Sum
Parity Bit of Weighted Sum
Last Digit of Weighted Sum
Modulo Seven of Weighted Sum
Clamp to 100 of Weighted Sum
Distance to 50 of Weighted Sum
Value of Sum of Squares
Absolute of Sum of Squares
Sign of Sum of Squares
Parity Bit of Sum of Squares
Last Digit of Sum of Squares
Modulo Seven of Sum of Squares
Clamp to 100 of Sum of Squares
Distance to 50 of Sum of Squares
Value of Double Sum
Absolute of Double Sum
Sign of Double Sum
Parity Bit of Double Sum
Last Digit of Double Sum
Modulo Seven of Double Sum
Clamp to 100 of Double Sum
Distance to 50 of Double Sum
Value of Integer Midpoint
Absolute of Integer Midpoint
Sign of Integer Midpoint
Parity Bit of Integer Midpoint
Last Digit of Integer Midpoint
Modulo Seven of Integer Midpoint
Clamp to 100 of Integer Midpoint
Distance to 50 of Integer Midpoint
No matching problems
Try another filter or search query.