Loading

Exercise Number: 1

Primitive Data Types

Scenario: You are creating a program to store and display information about a book.

Task:

  1. Declare and initialize variables to store the following details of a book:
    • Number of pages (int)
    • Rating (float)
    • Price (double)
    • Is it a bestseller (boolean)
    • The first letter of the book title (char)
  2. Print these details.