Skip to content

Commit d7dea58

Browse files
committed
Chapter 3.2 - Grammarly + Upper Letter Titles
1 parent 8f20b22 commit d7dea58

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

chapter-03-simple-conditions-exam-problems.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ if (bool expression) {
2121

2222
After having revised how to write simple conditions, let's solve a few exam problems to practice the **`if-else`** construction:
2323

24-
## Problem: Transportation Price
24+
## Problem: Transport Price
2525

2626
A student has to travel **n kilometers**. He can choose between **three types of transportation**:
2727
* **Taxi**. Starting fee: **0.70** BGN. Day rate: **0.79** BGN/km. Night rate: **0.90** BGN/km.
@@ -97,13 +97,13 @@ After we have checked the distance conditions and we have **calculated the price
9797
Test your solution here: [https://judge.softuni.org/Contests/Practice/Index/930#0](https://judge.softuni.org/Contests/Practice/Index/930#0).
9898

9999

100-
## Problem: Pipes in Pool
100+
## Problem: Pipes In Pool
101101

102102
A pool with **volume V** fills up via **two pipes**. **Each pipe has a certain flow rate** (the liters of water, flowing through a pipe for an hour). A worker starts the pipes simultaneously and goes out for **N hours**. Write a program that finds the state of the pool **the moment the worker comes back**.
103103

104104
### Input Data
105105

106-
**Four numbers are passes to the function** (arguments):
106+
**Four numbers are passed to the function** (arguments):
107107
* The first line (argument) contains a number **V – the volume of the pool in liters** – an integer in the range of [**1 … 10000**].
108108
* The second line (argument) contains a number **P1 – the flow rate of the first pipe per hour** – an integer in the range of [**1 … 5000**].
109109
* The third line (argument) contains a number **P2 – the flow rate of the second pipe per hour** – an integer in the range of [**1 … 5000**].
@@ -112,7 +112,7 @@ A pool with **volume V** fills up via **two pipes**. **Each pipe has a certain f
112112
### Output Data
113113

114114
Print on the console **one of the two possible states**:
115-
* To what extent the pool has filled up and how many percent each pipe has contributed with. All percent values must be formatted to an integer (without rounding).
115+
* To what extent the pool has filled up and how many percent each pipe has contributed. All percent values must be formatted to an integer (without rounding).
116116

117117
* "The pool is **[x]**% full. Pipe 1: **[y]**%. Pipe 2: **[z]**%."
118118
* If the pool has overflown – with how many liters it has overflown for the given time – a floating-point number.
@@ -280,7 +280,7 @@ After having done these calculations, we are ready to **calculate the quantity o
280280

281281
#### Checking The Conditions and Processing Output Data
282282

283-
After having done the necessary calculations, the next step is to **check** whether the liters of wine that have been produced, **is enough**. For that, we will use **a simple conditional statement** of the **`if-else`** type and we will check whether the liters of wine from the harvest are **more than** or **equal to** the **needed liters**.
283+
After having done the necessary calculations, the next step is to **check** whether the liters of wine that have been produced, **are enough**. For that, we will use **a simple conditional statement** of the **`if-else`** type and we will check whether the liters of wine from the harvest are **more than** or **equal to** the **needed liters**.
284284

285285
If the condition returns **`true`**, from the task requirement we see that **on the first line** we have to print **the wine that has been produced from the harvest**. That value has to be **rounded down to the nearest integer**, which we will do by using both the method **`Math.floor(…)`** and a **placeholder** when printing it.
286286

@@ -355,5 +355,4 @@ If **the time is not enough**, we print the additional hours that are needed for
355355

356356
### Testing in The Judge System
357357

358-
Test your solution here: [https://judge.softuni.org/Contests/Practice/Index/930#4](https://judge.softuni.org/Contests/Practice/Index/930#4).
359-
358+
Test your solution here: [https://judge.softuni.org/Contests/Practice/Index/930#4](https://judge.softuni.org/Contests/Practice/Index/930#4).

0 commit comments

Comments
 (0)