## Inspiration

I was inspired by my classmates to create this program. In class, we learned about calculating the sum of arithmetic sequences. My classmates would always end up making mistakes as it took time to compute the sum. So, I decided to create a mini calculator that could compute the sum for us!

## What it does

Essentially, my program asks the user what the first term of the sequence is, what the common difference between two of the terms is, and the number of terms in the sequence to determine the sum of the sequence. Then, it uses this formula to calculate the sum: **(n/2) * (2 * a + (n-1) * d)**
After computing the sum, it then tells the user what the sum of the arithmetic sequence is.

## How we built it

I coded this program using Java and used the Replit software to code my program in. To ask the user what numbers the program needs to calculate the sum, it imports the **java.util.Scanner**. After importing this file, it creates three double variables, which include **a** (the first term of the sequence), **d** (the common difference of two terms of the sequence), and **n** (the number of terms in the sequence). After creating the variables, it then asks the user what each variable should equal to. Then, the program creates another double variable called **sum**, which is the sum of the arithmetic sequence. After computing the sum, it then prints to the user what the sum is.

## Challenges we ran into

A challenge that I ran into was that I forgot to put the double quotation marks when I wanted to print a certain statement. This caused the software to give me an error, however, I figured out what the error was with my program and fixed it!

## Accomplishments that we're proud of

I am proud that I used the information that I learned from class and created a program to calculate the sum of an arithmetic sequence. I'm very happy that I wasn't just memorizing these formulas for no purpose, as I used my computer science skills to create a program using that formula.

## What we learned

I learned that I'm able to use my Java skills to create a mini calculator!

## What's next for Arithmetic Sequence Sum Education Hack!

As I have coded the program to calculate the sum of an arithmetic sequence, I can add more methods that are not found on a regular calculator to complete other math problems.

## Built With

- java
- replit

Log inorsign up for Devpostto join the conversation.