-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6b07c8c
commit 2d09c5f
Showing
1 changed file
with
25 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,25 @@ | ||
# ASD-Lab1 | ||
# Algorithms and data structures - Lab 1 | ||
|
||
Write programs to perform 5 different types of tasks: | ||
1) elementary operators | ||
2) conditional operators | ||
3) cycles | ||
4) arrays | ||
5) functions | ||
|
||
Check the correct operation of programs with different input data. | ||
|
||
In tasks where any variables are entered, it is desirable to implement their setting via data entry from the terminal (eg cin). In tasks with arrays it is recommended to fill them with random numbers (rand () function). | ||
|
||
<b>Importantly!</b> Allowed libraries to connect: | ||
- I / O libraries: \<iostream>, \<iomanip>, <stdio.h>, <conio.h> | ||
- library of mathematical functions: \<cmath> (math.h) | ||
- libraries for the randomize function: \<cstdlib> (stdlib.h), \<ctime> (time.h) | ||
- library to support Cyrillic output: \<clocale> (locale.h) | ||
- library for support of Ukrainian letters in the Windows console: <windows.h> | ||
|
||
1. Find the distance between the points π΄ (π₯1, π¦1) and π΅ (π₯2, π¦2) on the plane. | ||
2. The coordinates of point x and y are given. Check that it lies on the coordinate axis Ox or Oy and display a message about it. | ||
3. Organize an endless loop until the user enters 0 from the keyboard, then display how many attempts it took. | ||
4. Given an array of real numbers of size 16 elements which will be: π0, ..., π15. Find πππ₯(π0 - π8, π1 - π9, ..., π7 - π15). | ||
5. Set the mathematical function π(π₯) = π₯<sup>3</sup> - 2π₯<sup>2</sup> + π₯ - 1 as a function. Find the maximum value of the function on the segment [-3, 4], search to perform withstep 0.5. |