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

по заданной строке и символу определить сколько раз встречается этот символ в этой строке. информатика .Qbasike функции

Ответы

Автор ответа: mnv1962
1
DIM b AS STRING * 1
DIM a AS STRING * 100
DIM i, k, n AS INTEGER
INPUT "INPUT STRING", a$
INPUT b$
k = LEN(a$)
FOR i = 1 TO k
IF MID$(a$, i, 1) = b$ THEN 
n = n + 1
END IF
NEXT i
PRINT n
END
Похожие вопросы
Предмет: Английский язык, автор: Люси18

Choose the correct answer.
1. Dead patients are taken to the ____________.
1 The Renal Unit 2 mortuary
3 dispenses 4 pathology 5 Reception 6 scales 7corridor8 waste 9 stretchers 10 lift
_______ is next to the main entrance.
2. We use ______ for patients who can’t sit up.
1 The Renal Unit 2 mortuary
3 dispenses 4 pathology 5 Reception 6 scales 7corridor8 waste 9 stretchers 10 lift
_______ is next to the main entrance.
3. Take the ______ to get to the next door.
1 The Renal Unit 2 mortuary
3 dispenses 4 pathology 5 Reception 6 scales 7corridor8 waste 9 stretchers 10 lift
_______ is next to the main entrance.
4. __________ are used for weighting substances.
1 The Renal Unit 2 mortuary
3 dispenses 4 pathology 5 Reception 6 scales 7corridor8 waste 9 stretchers 10 lift
_______ is next to the main entrance.
5. ________ studies illnesses and analyses samples.
1 The Renal Unit 2 mortuary
3 dispenses 4 pathology 5 Reception 6 scales 7corridor8 waste 9 stretchers 10 lift
_______ is next to the main entrance.
6. Each bed produces 4.5 kilos of ________ daily.
1 The Renal Unit 2 mortuary
3 dispenses 4 pathology 5 Reception 6 scales 7corridor8 waste 9 stretchers 10 lift
7. The Pharmacy ___________ medicine.
1 The Renal Unit 2 mortuary
3 dispenses 4 pathology 5 Reception 6 scales 7corridor8 waste 9 stretchers 10 lift
_______ is next to the main entrance.
8. _______ treats kidney diseases.
1 The Renal Unit 2 mortuary
3 dispenses 4 pathology 5 Reception 6 scales 7corridor8 waste 9 stretchers 10 lift
_______ is next to the main entrance.
9. Go along this ____________ and through the doors.
1 The Renal Unit 2 mortuary
3 dispenses 4 pathology 5 Reception 6 scales 7corridor8 waste 9 stretchers 10 lift
_______ is next to the main entrance.