Функции Copy, Pos, процедуры Delete, Insert.

Функция Copy позволяет копировать из строки часть символов. Функция имеет 3 параметра. Copy (st, index, count). St-строка из которой копируют, Index-номер символа, с которого начинается копирование, Count-количество символов, которое будет ...

Процедуры Dec и Inc в Pascal.

При работе с целыми числами используются процедуры DEC и INC. Процедура Dec уменьшает число на определенное значение, а процедура Inc увеличивает число на определенное значение.

Тип данных String в Pascal.

Со строковыми переменными можно производить различные операции. Операция сцепления строк позволяет соеденить 2 строки между собой.

Циклы и массивы

Спецификация процедуры.

Процедура представляет собой программу в миниатюре, являясь в свою очередь частью основной программы или другой процедуры. Синтаксис процедуры полностью повторяет синтаксис программы.

Программирование вычислительных процессов.

Решение задачи на ЭВМ — это сложный процесс, в ходе которого пользователю приходится выполнять целый ряд действий, прежде чем он получит интересующий его результат.

Задача табулирования функции предполагает получение таблицы значений функции при изменении аргумента с фиксированным шагом. В качестве исходной информации должны быть заданы: Х0, Хn – начало и конец промежутка табулирования, при этом (Х0< Хn); n – число шагов разбиения промежутка [Х0, Xn]; F(X) – описание табулируемой функции.

При составлении алгоритма предполагается, что X – текущее значение аргумента; h – шаг изменения аргумента (иногда его называют шагом табуляции функции); i – текущий номер точки, в которой вычисляются функция (i = 0 .. n).
Количество интервалов n, шаг табуляции h и величины Х0, Хn связаны между собой фор-мулой:

tabulirovanie funkcii

Интерпретация переменных (т. е. их обозначение в математической постановке задачи, смысл и тип, обозначения в блок-схеме и программе) приведена в таблице имен.

tabulirovanie funkcii.

Пример 17. Табулировать функцию F(X) в N равноотстоящих точках, заданную на промежутке [Х0, Xn], где

tabulirovanie funkcii..PROGRAM PR17;
VAR
I, N: INTEGER;
X, Y: REAL;
H, X0, XN: REAL;
BEGIN
WRITELN('ВВЕДИТЕ X0, XN, N');
READLN(X0, XN, N);
H := (XN - X0)/N;
FOR I:=0 TO N
DO BEGIN
       Y:= SIN(X+1)*EXP(2-X*X);
       X := X0 + I * H;
       WRITELN (X:4:1,",Y:9:6)
       END
END.

tabulirovanie funkcii...

Теперь запишем решение этой же задачи, но с использованием цикла While...DO.

PROGRAM PR17_while;
VAR
N: INTEGER;
X, Y: REAL;
H, X0, XN: REAL;
BEGIN
WRITELN('ВВЕДИТЕ X0, XN, N');
READLN(X0, XN, N);
H := (XN - X0)/N;
X:=X0;
WHILE X<=XN
DO BEGIN
       Y:= SIN(X+1)*EXP(2-X*X);
       X := X + H;
       WRITELN (X:4:1,",Y:9:6)
       END
END.

tabulirovanie funkcii....


Предыдущая статья: Примеры использования различных операторов цикла.
Оглавление: Лекции по Pascal.
Следующая статья: Арифметический цикл с рекуррентной зависимостью.


Комментарии  

 
-4 # ника 18.11.2012 13:37
8. Описати процедуру перевірки простоти числа. Описати процедуру перевірки числа на розкладеність в суму виду 1+2а. Скласти програму, яка вибирає з даного масиву чисел ті, які задовільняють двом вимогам.
Ответить
 
 
-4 # Катя 18.12.2012 13:45
что такое i в первой программе?
Ответить
 
 
-5 # Дмитрий 16.04.2014 16:51
первое значение цикла
Ответить
 
 
-5 # Jes 24.12.2012 11:57
:eek: :-| :-? :o :cry:
Ответить
 
 
0 # Loren 30.05.2017 20:22
Hej ! Coś hosting szwankuje, strona przestaje działać co jakiś czas.


Also visit my blog post ... jak zainwestować 5000 zł: http://sg6edge.pl/
Ответить
 
 
0 # Shalanda 06.06.2017 04:56
WOW juѕt what Ӏ was lookong for. Came here by searching for ffifi awards 2013
nyc

my blog post fіfa 18 news (Marsha: http://xn--90aeqjmdjhj.xn--p1ai/blog/1289.html)
Ответить
 
 
0 # Kristin 06.06.2017 09:26
Hi mates, how is everything, and what you wish for to say regarding this
paragraph, in my view its in fact amazing designed for me.


my site ... Milosz Szuster: http://ladnabizuteria.hekko24.pl
Ответить
 
 
0 # Janette 09.06.2017 11:30
Hi there, I enjoy reading through your post.
I wanted to write a little comment to support you.



Feel free to visit my web site ... Apolinary Zamojski: http://ladnesukienki.hekko24.pl
Ответить
 
 
0 # Zack 09.06.2017 22:36
We are a gaggle of volunteers and starting a brand new scheme in our community.
Your web site provided us with useful info to work on. You've performed an impressive job and our
entire community shall be thankful to you.

My weblog - Apoloniusz
Wloch: http://ladnesukienki.xcl.pl
Ответить
 
 
0 # Bonnie 10.06.2017 05:45
Hello, I read your blog on a regular basis. Your story-telling style
is awesome, keep doing what you're doing!

my website :: Zachariasz Konopka: http://ladnespodnie.xcl.pl
Ответить
 
 
0 # Fidel 10.06.2017 21:28
Magnificent goods from you, man. I've understand your stuff previous to and you're just too fantastic.
I really like what you've acquired here, really like
what you're stating and the way in which you say it.

You make it enjoyable and you still take care of to keep it smart.
I can't wait to read much more from you. This is really a terrific
web site.

My page Izaak Wojtal: http://ladnabielizna.vipower.pl
Ответить
 
 
0 # Senaida 11.06.2017 01:45
Greetings! Very useful advice in this particular post!
It is the little changes that make the most important changes.
Thanks for sharing!

Also visit my site; Bogusz
Podolski: http://kurtkiplaszcze.hekko24.pl
Ответить
 
 
0 # Terry 11.06.2017 08:31
I'm curious to find out what blog system you're using?
I'm experiencing some minor security issues with my latest site and I would like to find something more safe.

Do you have any recommendations?

My web-site - Odolan Czopek: http://ladnabielizna.xcl.pl
Ответить
 
 
0 # Modesta 11.06.2017 13:58
Hey There. I discovered your blog the usage of msn. That is an extremely smartly written article.
I will be sure to bookmark it and return to learn extra of
your useful information. Thank you for the post. I will certainly comeback.


Review my weblog ... Dariusz Wagner: http://ladnabielizna.hekko24.pl
Ответить
 
 
0 # Lamar 11.06.2017 18:19
I don't know whether it's just me or if perhaps everyone else encountering issues
with your site. It appears like some of the written text in your content are running off the screen. Can someone else please provide feedback and let me
know if this is happening to them too? This could be a issue
with my browser because I've had this happen previously.
Kudos

Here is my page: Norman Stepinski: http://ladnabizuteria.hekko24.pl
Ответить
 
 
0 # Angelita 11.06.2017 22:05
Right here is the perfect website for anybody who would like to find out about this topic.
You know so much its almost hard to argue with you (not that I really will need
to…HaHa). You certainly put a fresh spin on a topic that has been discussed for ages.

Excellent stuff, just great!

my page; Nestor Ziemba: http://ladnespodnie.098.pl
Ответить
 
 
0 # Lieselotte 12.06.2017 00:50
I don't even know how I ended up here, but I thought this post was great.
I do not know who you are but certainly you're
going to a famous blogger if you aren't already ;) Cheers!



My blog Brian Napieralski: http://ladnesukienki.h2g.pl
Ответить
 
 
0 # Katherina 12.06.2017 03:11
I all the time used to study paragraph in news
papers but now as I am a user of net therefore from now
I am using net for articles or reviews, thanks to web.


my web-site ... Szymon Soja: http://bluzkikoszule.xcl.pl
Ответить
 
 
0 # Bernd 30.06.2017 12:52
Thank you a lot for sharing this with all people you really recognize what you're speaking approximately!
Bookmarked. Kindly additionally seek advice from my site =).
We can have a hyperlink alternate contract between us

Feel free to visit my weblog ... Emilian Augustyn: http://ladnabielizna.vipower.pl
Ответить
 
 
0 # Anastasia 30.06.2017 17:39
What a data of un-ambiguity and preserveness
of valuable know-how about unpredicted emotions.

Here is my site: Aleksy Kosakowski: http://ladnabizuteria.hekko24.pl
Ответить
 
 
0 # Claribel 30.06.2017 22:13
Right away I am going to do my breakfast, after having my breakfast coming over again to read further
news.

Feel free to surf to my weblog Marceli Kucia: http://ladnesukienki.098.pl
Ответить
 
 
0 # Jovita 01.07.2017 08:47
For most up-to-date news you have to pay a quick visit world wide
web and on the web I found this web site as a finest web site for most up-to-date updates.


my weblog ... Benedykt Kruczkowski: http://ladnesukienki.h2g.pl
Ответить
 
 
0 # Katrice 01.07.2017 18:11
Appreciating the commitment you put into your site and in depth information you provide.
It's nice to come across a blog every once in a while that isn't the same old rehashed material.

Excellent read! I've saved your site and I'm including your RSS feeds to my Google
account.

my web-site; Wolfgang
Fratczak: http://ladnesukienki.xcl.pl
Ответить
 
 
0 # Brigette 02.07.2017 03:07
I used to be suggested this web site via my cousin. I'm not sure whether this publish is written via him as nobody else realize such detailed approximately my trouble.
You are incredible! Thanks!

Visit my weblog; Marcus Matuszewski: http://ladnebuty.xcl.pl
Ответить
 
 
0 # Lavonda 02.07.2017 10:36
Wow, amazing blog layout! How long have you been blogging for?
you make blogging look easy. The overall look of your site is great, let alone the content!



Also visit my web page: Kordian Serafin: http://ladnebuty.vipower.pl
Ответить
 
 
0 # Luisa 02.07.2017 13:32
Hello there! Do you know if they make any plugins to help
with SEO? I'm trying to get my blog to rank for some targeted keywords but I'm not seeing very good results.
If you know of any please share. Kudos!

Look into my web site - Krzysztof luszczynski: http://ladnebuty.vipower.pl
Ответить
 
 
0 # Wendell 02.07.2017 17:50
Undeniably believe that which you said. Your favorite reason appeared to be on the web the simplest thing to be
aware of. I say to you, I definitely get annoyed while people think about worries that they plainly
don't know about. You managed to hit the nail upon the top and defined out the whole thing without having side-effects , people could take a signal.
Will likely be back to get more. Thanks

Here is my web page :: Roman Bigos: http://ladnetorebki.xcl.pl
Ответить
 
 
0 # Foster 03.07.2017 07:32
I was wondering if you ever thought of changing the layout of your site?
Its very well written; I love what youve got to say.
But maybe you could a little more in the way of content so
people could connect with it better. Youve got an awful lot of text for only having one or two images.
Maybe you could space it out better?

My weblog; Saturnin Kasztelan: http://ladnabizuteria.hekko24.pl
Ответить
 
 
0 # Rosalina 03.07.2017 11:58
Hello, I do think your site could be having internet browser compatibility issues.

Whenever I take a look at your website in Safari, it looks
fine but when opening in IE, it has some overlapping issues.
I merely wanted to provide you with a quick heads up!
Other than that, excellent blog!

Feel free to visit my blog post - Krystian Ziolkowski: http://kurtkiplaszcze.hekko24.pl
Ответить
 
 
0 # Klaus 04.07.2017 16:00
A person necessarily help to make significantly posts I would state.
This is the very first time I frequented your website page and thus far?

I amazed with the analysis you made to make this actual post extraordinary.
Excellent activity!

my web page: Maksym Marszal: http://ladnabielizna.xcl.pl
Ответить
 
 
0 # Emerson 04.07.2017 23:26
It's the best time to make some plans for the future and it's time to be happy.
I have read this post and if I could I wish to suggest you few interesting things
or suggestions. Maybe you could write next articles referring to this article.
I want to read even more things about it!

My webpage - Bogdan Mocek: http://ladnabizuteria.vipower.pl
Ответить
 
 
0 # Joni 05.07.2017 16:30
As the admin of this site is working, no question very quickly it
will be renowned, due to its quality contents.



my web page - Anatol Rogozinski: http://ladnebuty.xcl.pl
Ответить
 
 
0 # Pearl 06.07.2017 19:25
Hello my family member! I want to say that this article is awesome, nice written and come with approximately
all significant infos. I would like to peer extra
posts like this .

My website - Kornel Wilczak: http://ladnabizuteria.vipower.pl
Ответить
 
 
0 # Geri 07.07.2017 04:34
When some one searches for his essential thing, thus he/she desires to be available that
in detail, therefore that thing is maintained over here.

Here is my web-site - Eliasz Klosek: http://tanieperfumy.098.pl
Ответить
 
 
0 # Susanne 07.07.2017 06:53
Have you ever considered creating an ebook or guest authoring on other websites?
I have a blog based on the same ideas you discuss and would
love to have you share some stories/informa tion. I know my subscribers would appreciate your work.

If you are even remotely interested, feel free to shoot me an e-mail.


Here is my web site Grzegorz Opalinski: http://tanieperfumy.xcl.pl
Ответить
 

Добавить комментарий

Защитный код
Обновить

   ГлавнаяПаскальЛекции по ПаскальПоиск минимального и максимального элементов массива.