@@ -156,11 +156,12 @@ $\text{Perimeter of a rectangle} = 2 \times \rm{(length + breadth)}$
156
156
> O/p: 16
157
157
158
158
<br >
159
- > ** Sample 2:**
160
- I/p:
161
- 22
162
- 21
163
- O/p: 86
159
+
160
+ > ** Sample 2:**
161
+ > I/p:
162
+ > 22
163
+ > 21
164
+ > O/p: 86
164
165
165
166
---
166
167
@@ -174,11 +175,12 @@ $\text{Area of a rectangle} = \text{length} \times \text{breadth}$
174
175
> O/p: 16
175
176
176
177
<br >
177
- > ** Sample 2:**
178
- I/p:
179
- 22
180
- 21
181
- O/p: 462
178
+
179
+ > ** Sample 2:**
180
+ > I/p:
181
+ > 22
182
+ > 21
183
+ > O/p: 462
182
184
183
185
---
184
186
@@ -192,11 +194,12 @@ $\text{Perimeter} = \text{number of sides} \times \text{length of one side}$
192
194
> O/p: 32
193
195
194
196
<br >
195
- > ** Sample 2:**
196
- I/p:
197
- 7 <br >
198
- 21
199
- O/p: 147
197
+
198
+ > ** Sample 2:**
199
+ > I/p:
200
+ > 7 <br >
201
+ > 21
202
+ > O/p: 147
200
203
201
204
---
202
205
@@ -210,11 +213,12 @@ $\text{Area of right triangle} = \dfrac{1}{2} \times \rm{base} \times \rm{height
210
213
> O/p: 8.0
211
214
212
215
<br >
213
- > ** Sample 2:**
214
- I/p:
215
- 22
216
- 21
217
- O/p: 231.0
216
+
217
+ > ** Sample 2:**
218
+ > I/p:
219
+ > 22
220
+ > 21
221
+ > O/p: 231.0
218
222
219
223
---
220
224
@@ -227,10 +231,11 @@ $\text{Perimeter of a circle} = 2\pi \times \rm{radius}$
227
231
> O/p: 25.133
228
232
229
233
<br >
230
- > ** Sample 2:**
231
- I/p:
232
- 22
233
- O/p: 138.230
234
+
235
+ > ** Sample 2:**
236
+ > I/p:
237
+ > 22
238
+ > O/p: 138.230
234
239
235
240
---
236
241
@@ -242,6 +247,8 @@ $\text{Area of a circle} = \pi \times \rm{radius}^2$
242
247
> 4 <br >
243
248
> O/p: 50.265
244
249
250
+ <br >
251
+
245
252
> ** Sample 2:**
246
253
> I/p:
247
254
> 21
@@ -252,7 +259,7 @@ $\text{Area of a circle} = \pi \times \rm{radius}^2$
252
259
** Q16:** Write a program to get the sides of a triangle and print its area using Heron's Formula rounded off to 3 decimal places.
253
260
$\text{Area of right triangle} = \sqrt{s \times (s-a)\times(s-b)\times(s-c)}$
254
261
$\rm{where},$
255
- $s = \text{Semi-Perimeter} = \dfrac{\text{Perimter of triangle}}{2}$
262
+ $s = \text{Semi-Perimeter} = \dfrac{\text{Perimeter of triangle}}{2}$
256
263
$a, ~ b, ~ c = \text{Sides of the triangle}$
257
264
258
265
> ** Sample 1:**
@@ -262,6 +269,8 @@ $a, ~b, ~c = \text{Sides of the triangle}$
262
269
> 5
263
270
> O/p: 6.0
264
271
272
+ <br >
273
+
265
274
> ** Sample 2:**
266
275
> I/p:
267
276
> 12
@@ -280,10 +289,11 @@ $\text{Area of equilateral triangle} = \dfrac{\sqrt{3}}{4} \times \rm{side}^2$
280
289
> O/p: 6.9282
281
290
282
291
<br >
283
- > ** Sample 2:**
284
- I/p:
285
- 31
286
- O/p: 416.1252
292
+
293
+ > ** Sample 2:**
294
+ > I/p:
295
+ > 31
296
+ > O/p: 416.1252
287
297
288
298
---
289
299
@@ -297,11 +307,12 @@ From Pythagoras theorem, $ \rm{hypotenuse} = \sqrt{\rm{base}^2 + \rm{height}^2}$
297
307
> O/p: 5
298
308
299
309
<br >
300
- > ** Sample 2:**
301
- I/p:
302
- 12
303
- 6 <br >
304
- O/p: 13.416
310
+
311
+ > ** Sample 2:**
312
+ > I/p:
313
+ > 12
314
+ > 6 <br >
315
+ > O/p: 13.416
305
316
306
317
---
307
318
0 commit comments