# Coin Flipper

## Flip a Coin – Heads or Tails

#### Steps to Use:

1. Enter the Number of Flips:

• In the Flip input field, enter the number of times you want to flip the coin.
• For example, entering `1` will simulate a single coin flip, while entering `5` will flip the coin five times.
2. Click the Flip Button:

• After entering the number of flips, click the Flip button to simulate the coin flip(s).
• The results will be displayed on the screen, and the details will be shown in a table format.
3. Viewing Results:

• Single Flip: If you flip the coin once, you will see the coin image (Heads or Tails) along with the result. Each time you click Flip, the new result will be added to the previous ones.
• Multiple Flips: If you flip more than one coin (e.g., 5 flips), the results will be shown in a table without images. The results from the previous flips will be cleared.
4. Resetting the Calculator:

• Click the Reset button to clear all previous results and start fresh. This will reset the number of flips, percentages, and the results table.

#### Examples:

• Single Flip Example:

• Enter `1` in the Flip field and click Flip. The result will show either “Heads” or “Tails” with the coin image, and the result will be stored in the table.
• Click Flip again to add another flip result to the table.
• Multiple Flips Example:

• Enter `3` in the Flip field and click Flip. The calculator will simulate three flips, and the results will be shown in the table. The coin images will not be displayed.

#### Key Details:

• Percentage Calculation: The calculator will calculate the percentage of heads and tails based on the total number of flips.
• Table Format: All results are stored and displayed in a table with the flip number and the result (Heads or Tails).
• Coin Images: The coin images are shown only when flipping 1 coin at a time.