Предмет: Информатика, автор: kirillkudash

составить программу заполнения массива а[1..10] следующими числами:индекс массива 1 2 3 4 5 6 7 8 9 10
значение элемента 1 6 3 12 5 18 7 24 9 30

закономерность- значения элементов с нечетными индексами равны индексу элемента,а значения элементов с четными индексами-утроенному индексу элемента

нужно он var то end.



Ответы

Автор ответа: diman1670
0
var
i,n:integer;
f1,f2:text;
begin
assign(f1, 'input.txt');
assign(f2, 'output.txt');
reset(f1);
rewrite(f2);
read (f1,n);
for i:=1 to n do
if (i mod 2) = 1 then write(f2, i, ' ' ) else write (f2, i*3, ' ');  
close(f1);
close(f2);
end.
Автор ответа: diman1670
0
Ну мало ли) Просто я всегда с файлами работаю)
Автор ответа: kirillkudash
0
спасибо вам тоже но тут както мудрено для 9 касса
Автор ответа: diman1670
0
я не знаю) я в 9 классе) это легкая, просто я не очень внимательный и из-за этого...
Автор ответа: Аноним
0
ЗАЧЕМ ЧИТАТЬ ФАЙЛ, если потом его значения не используются?
Автор ответа: Аноним
0
А....девятый класс.... ну ничего, еще есть время научиться писать программы))))
Похожие вопросы
Предмет: Английский язык, автор: mishaisayev06
составить 10 предложении по этому тексту there is there are даю 100 баллов
My name is Marina Suvorova. I am 15. I was born on the 5 of March, 1985 in Rostov-on-Don. Now I live in Rostov with my parents and my grandmother.
My family is not very large. We have five people in our family. Му father's name is Igor Petrovich Не is forty уеаrs old. Не is а doctor and he works at а hospital. Му mother's name is Lyudmila Leonidovna.She is thirty nine уеаrs old.
She is а housewife. My younger sister is а pupil. She is in the seventh form. My grandmother lives with us.She doesn't work. She is а pensioner. I love my family. We are all friends and we love each other.
I have one aunt and two uncles. Their children are my cousins. We live in a big flat in а new house. There are four rooms in our flat: а living room, а study, а kitchen, а bathroom and two bedrooms. We have all modern conveniences: gas, hot water, running water, electricity and telephone.
I have my duties about the house. I must go shopping. I help my Mother to clean the rooms. It' s not difficult for me. I like our home to be clean and tidy.
I am а student of the college now. We have many good teachers at our college. I try to be а good pupil and I do well in а11 subjects. But my favourite subject is English.
I spend much time on it. 1 like reading. I like detective stories but I prefer to read historical novels or modern writers. I have many friends. Many of them are my classmates. We spend much time together, go for а walk, talk about lessons, music and discuss our problems.
I like to listen to modern music, but sometimes I like to listen to some classical music. My favourite composer is Tchaikovsky. I haven't much time to watch TV but sometimes I spend an hour or two watching an interesting film or a news programme. In the evening I often read newspapers or an interesting book. I like fresh air and exercises, but I have not much time to go in for sports
Предмет: Химия, автор: opatskivlad