Skip to content

Commit 414b76a

Browse files
Update chapter-02-simple-calculations.md
1 parent bc9aef7 commit 414b76a

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

chapter-02-simple-calculations.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ Next, test the solution locally using [**Ctrl+Shift+F10**] and by entering sampl
615615
Test your solution here: [https://judge.softuni.bg/Contests/Practice/Index/649#3](https://judge.softuni.bg/Contests/Practice/Index/649#3).
616616

617617

618-
### Exercise: Trapezoid аrea
618+
### Exercise: Trapezoid area
619619

620620
Write a program that reads three numbers from the console **b1**, **b2** and **h** and calculates **the area of a trapezoid** with bases **b1** and **b2** and height **h**. The formula for the area of trapezoid is **(b1 + b2) * h / 2**.
621621

@@ -638,9 +638,9 @@ The code on the picture is consciously blurred for you to give a thought and fin
638638
Test your solution here: [https://judge.softuni.bg/Contests/Practice/Index/649#4](https://judge.softuni.bg/Contests/Practice/Index/649#4).
639639

640640

641-
### Exercise: Circle Area and Perimeter
641+
### Exercise: Circle area and perimeter
642642

643-
Write a program that reads from the console **a number r** r and calculates and prints **the area and perimeter of the circle**/**round** with **radius r**.
643+
Write a program that reads from the console **a number r** r then calculates and prints **the area and perimeter of the circle**/**round** with **radius r**.
644644

645645
#### Sample input and output
646646

@@ -651,7 +651,7 @@ Write a program that reads from the console **a number r** r and calculates and
651651

652652
#### Hints and guidelines
653653

654-
For the calculations you may use the following formulas:
654+
For the calculations, you can use the following formulas:
655655
- **`Area = Math.PI * r * r`**.
656656
- **`Perimeter = 2 * Math.PI * r`**.
657657

@@ -660,7 +660,7 @@ For the calculations you may use the following formulas:
660660
Test your solution here: [https://judge.softuni.bg/Contests/Practice/Index/649#5](https://judge.softuni.bg/Contests/Practice/Index/649#5).
661661

662662

663-
### Exercise: Rectangle Area
663+
### Exercise: Rectangle area
664664

665665
**A rectangle** is defined by the **coordinates** at two of its opposite angles (x1, y1) – (x2, y2). Calculate its **area and perimeter**. **The input** is read from the console. The numbers **x1, y1, x2 и y2** are given one per line. **The output** is printed on the console and it has to contain two lines, each with one number – the area and the perimeter.
666666

@@ -679,7 +679,7 @@ Test your solution here: [https://judge.softuni.bg/Contests/Practice/Index/649#5
679679
Test your solution here: [https://judge.softuni.bg/Contests/Practice/Index/649#6](https://judge.softuni.bg/Contests/Practice/Index/649#6).
680680

681681

682-
### Exercise: Triangle Area
682+
### Exercise: Triangle area
683683

684684
Write a program that reads from the console **a side and height of a triangle** and calculates its area. Use **the formula** for triangle area: **area = a * h / 2**. Round the result to **2 digits after the decimal point using `Math.round(area, 2)`**.
685685

@@ -697,9 +697,9 @@ Write a program that reads from the console **a side and height of a triangle**
697697
Test your solution here: [https://judge.softuni.bg/Contests/Practice/Index/649#7](https://judge.softuni.bg/Contests/Practice/Index/649#7).
698698

699699

700-
### Exercise: Converter – from °C Degrees to °F Degrees
700+
### Exercise: Converter – from °C (Celsius) to °F (Fahrenheit)
701701

702-
Write a program that reads **degrees on Celsius scale** (°C) and converts them to **degrees on Fahrenheit scale** (°F). Look on the Internet for a proper [formula](http://bfy.tw/3rGh "Търсене в Google"), to do the calculations. Round the result to **2 digits after the decimal point**. Here are a few examples:
702+
Write a program that reads **degrees on Celsius scale** (°C) and converts them to **degrees on Fahrenheit scale** (°F). Look on the Internet for a proper [formula](http://bfy.tw/3rGh "Търсене в Google"), to do the calculations. Round the result to **2 digits after the decimal point**. Here are a few sample data:
703703

704704
#### Sample input and output
705705

@@ -715,9 +715,9 @@ Write a program that reads **degrees on Celsius scale** (°C) and converts them
715715
Test your solution here: [https://judge.softuni.bg/Contests/Practice/Index/649#8](https://judge.softuni.bg/Contests/Practice/Index/649#8).
716716

717717

718-
### Exercise: Converter – from Radians to Degrees
718+
### Exercise: Converter – from radians to degrees
719719

720-
Write a program, that reads **ъan angle in [radians](https://bg.wikipedia.org/wiki/Радиан)** (**`rad`**) and converts it to **[degrees](https://bg.wikipedia.org/wiki/Градус_(ъгъл))** (`deg`). Look for a proper formula on the Internet. The number **π** in Java programs is available through **``Math.PI``**. Round the result to the nearest integer using the method **``Math.round(…)``**.
720+
Write a program, that reads **an angle in [radians](https://en.wikipedia.org/wiki/Radian)** (**`rad`**) and converts it to **[degrees](https://en.wikipedia.org/wiki/Degree_(angle))** (**`deg`**). Look for a proper formula on the Internet. The number **π** in Java programs is available through **``Math.PI``**. Round the result to the nearest integer using the method **``Math.round(…)``**.
721721

722722
#### Sample input and output
723723

@@ -735,7 +735,7 @@ Test your solution here: [https://judge.softuni.bg/Contests/Practice/Index/649#9
735735

736736
### Exercise: Converter – USD to BGN
737737

738-
Write a program for **conversion of US dollars** (USD) **into Bulgarian levs** (BGN). **Round** the result **2 digits** след десетичния знак. after the decimal point. Use a fixed rate between a dollar and levs: **1 USD = 1.79549 BGN**.
738+
Write a program for **conversion of US dollars** (USD) **into Bulgarian levs** (BGN). **Round** the result **2 digits** after the decimal point. Use a fixed rate between a dollar and levs: **1 USD = 1.79549 BGN**.
739739

740740
#### Sample input and output
741741

@@ -750,15 +750,15 @@ Write a program for **conversion of US dollars** (USD) **into Bulgarian levs** (
750750
Test your solution here: [https://judge.softuni.bg/Contests/Practice/Index/649#10](https://judge.softuni.bg/Contests/Practice/Index/649#10).
751751

752752

753-
### Exercise: \* Currency Converter
753+
### Exercise: \* Currency converter
754754

755755
Write a program for **conversion of money from one currency into another**. It has to support the following currencies: **BGN, USD, EUR, GBP**. Use the following fixed currency rates:
756756

757-
| Course | USD | EUR | GBP |
757+
| Exchange rate | USD | EUR | GBP |
758758
|:------:|:-------:|:-------:|:-------:|
759759
| 1 BGN | 1.79549 | 1.95583 | 2.53405 |
760760

761-
**The input** is **sum for conversion**, **input currency** and **output currency**. **The output** is one number – the converted value of the above currency rates, rounded **2 digits** after the decimal point.
761+
**The input** consists of three lines - the first is **a sum for conversion**, the second is the **input currency**, and the third is **output currency**. **The output** is one number – the converted value according to the above exchange rates, rounded **2 digits** after the decimal point.
762762

763763
#### Sample input and output
764764

@@ -774,9 +774,9 @@ Write a program for **conversion of money from one currency into another**. It h
774774
Test your solution here: [https://judge.softuni.bg/Contests/Practice/Index/649#11](https://judge.softuni.bg/Contests/Practice/Index/649#11).
775775

776776

777-
### Exercise: ** Date Calculations – 1000 Days on the Earth
777+
### Exercise: ** Date calculations – 1000 days on the Earth
778778

779-
Write a program that enters a **birth date** in format **`dd-MM-yyyy`** and calculates the date on which **1000 days** are turned since this birth date and prints it in the same format.
779+
Write a program that reads from the console a **birth date** in format **`dd-MM-yyyy`** then calculates the date on which **1000 days** are turned since this birth date, and prints the output in the same format.
780780

781781
#### Sample input and output
782782

@@ -789,7 +789,7 @@ Write a program that enters a **birth date** in format **`dd-MM-yyyy`** and calc
789789
|14-06-1980|11-03-1983|
790790

791791
#### Hints and guidelines
792-
* Look for information about the data type **`Date`**, **`Calendar`** and **`SimpleDateFormat`** in Java and in particular look at the methods **`Calendar.setTime(date)`**, **`Calendar.add(countDays)`** and **`SimpleDateFormat.format(date)`**. With their help you can solve the problem without the need to calculate days, months and leap years.
792+
* Look for information about the types **`Date`**, **`Calendar`** and **`SimpleDateFormat`** in Java and in particular look at the methods **`Calendar.setTime(date)`**, **`Calendar.add(countDays)`** and **`SimpleDateFormat.format(date)`**. With their help, you can solve the problem without the need to calculate days, months, and leap years.
793793
* **Don't print** anything additional on the console except for the wanted date!
794794

795795
#### Testing in the Judge system

0 commit comments

Comments
 (0)