заработок на кликах
Вы еще не зарегестрированы на Uchit.net? Зачем?
Login: Pass:

Курсовая работа по информатике

реферат: Кибернетика

Оцените работу
всего оценок0 общий балл0
Зарегистрируйтесь

Программа

CLS

REM Vvod danni

INPUT "vvediimia fila"; file$

OPEN file$ FOR INPUT AS #1

INPUT #1, n

DIM c$(n), n$(n), s(n), k(n), f(n), t(n)

PRINT "ishodni massiv"

FOR i = 1 TO n

INPUT #1, c$(i), n$(i), s(i), k(i), f(i), t(i)

GOSUB 2

NEXT i

FOR i = 1 TO n

FOR j = 1 TO n - 1

IF n$(j) > n$(j + 1) GOTO 1

SWAP n$(j), n$(j + 1): SWAP c$(j), c$(j + 1): SWAP s(j), s(j + 1)

SWAP k(j), k(j + 1): SWAP f(j), f(j + 1): SWAP t(j), t(j + 1)

1 : NEXT j

NEXT i

PRINT

REM Sortiruem

PRINT "danni pasle sortirovke"

PRINT

FOR i = 1 TO n

GOSUB 2

NEXT

PRINT "danni posle sortirovki"

PRINT "0%-50%"

FOR i = 1 TO n

IF f(i) > 0 AND f(i) < 50 THEN GOSUB 2

NEXT i

REM Grupiruem

PRINT "50%-75%"

FOR i = 1 TO n

IF f(i) >= 50 AND f(i) < 75 THEN GOSUB 2

NEXT i

PRINT "75%-100%"

FOR i = 1 TO n

IF f(i) >= 75 AND f(i) < 100 THEN GOSUB 2

NEXT i

REM vivodim

INPUT "Vvedite imai vihod file"; file2$

OPEN file2$ FOR OUTPUT AS #2

PRINT #2, "Suda s vilovom 0%-50%, otsortir v por vosrast"

PRINT

FOR i = 1 TO n

IF f(i) < 50 AND f(i) > 0 THEN GOSUB 3

NEXT i

PRINT #2, "Suda s vilovom 50%-75%, otsort v por vosrast"

PRINT

FOR i = 1 TO n

IF f(i) <= 75 AND f(i) >= 50 THEN GOSUB 3

NEXT i

PRINT #2, "Suda s vilovom 75%-100% v por vosrast"

PRINT

FOR i = 1 TO n

IF f(i) < 100 AND f(i) > 75 THEN GOSUB 3

NEXT i

CLOSE #1, #2

REM risovanie

SCREEN 12

COLOR 2

LOCATE 1, 7

PRINT "Kursovai rabota po in-ke.y-11.Nikishova.V94"

h = 5

FOR i = 1 TO 10

h = h + 6

LOCATE 6, h: PRINT i

NEXT i

r = 6

FOR i = 1 TO 5

r = r + 3

LOCATE r, 7: PRINT i

NEXT i

LINE (70, 100)-(570, 350), 1, BF

FOR i = 70 TO 570 STEP 50

FOR j = 100 TO 350 STEP 50

LINE (i, 100)-(i, 350), 10

LINE (70, j)-(570, j), 10

NEXT j

NEXT i

FOR i = 1 TO n

d1 = INT(s(i) / 10)

d2 = ABS((d1 - s(i) / 10) * 10)

CIRCLE (72 + d1 * 50 + INT(RND(10) * 46), 102 + d2 * 50 + INT(RND(1) * 46)), 3, 10

NEXT i

REM shach1, snach2

a = 0: o = 0

FOR i = 1 TO n

IF s(i) <= 83 AND s(i) >= 11 THEN a = a + f(i): k = k + 1

IF s(i) <= 83 AND s(i) >= 11 AND c$(i) = "SRTM" THEN o = o + 1

NEXT i

LOCATE 24, 10: PRINT "Kolichestvo sudov v promislovom r-ne"; "-"; n

LOCATE 25, 18: PRINT "Danni po sudam 60-69 promislova r-na:"

LOCATE 26, 21: PRINT " kol-vo sudov tipa CPTM"; o

LOCATE 27, 21: PRINT "crednee snuch vilova vseh sudov"; a / k

END

2 : PRINT c$(i); n$(i); s(i); k(i); f(i); t(i)

RETURN

3 PRINT #2, c$(i), n$(i), s(i), k(i), f(i), t(i)

RETURN



















Исходный файл

14

BATM, SUHONDAEVSKIJ, 14, 45, 12, 86

MRTM, ATIA, 21, 32, 28, 74

SRTM, NEIRON, 62, 76, 84, 22

BATM, P.CAHCIBADZE, 03, 11, 55, 48

MRTM, RAMIGALA, 60, 89, 48, 6

MRTM, DITUVA, 73, 26, 62, 18

SRTM, MONOKRISTALL, 52, 68, 36, 95

SRTM, TAVA, 51, 18, 87, 21

BATM, PLUNGE, 52, 58, 9, 88

BATM, P.SAFRANOV, 34, 93, 74, 36

MRTM, DUSETOS, 94, 47, 19, 72

SRTM, BERKLIJ, 71, 31, 40, 45

SRTM, KORIFENA, 52, 54, 69, 68

BATM, STARIJ ARBAT, 01, 40, 94, 59



Выходной файл

Suda s vilovom 0%-50%, otsortir v por vosrast

BATM          SUHONDAEVSKIJ  14            45            12            86

MRTM          RAMIGALA       60            89            48            6

BATM          PLUNGE         52            58            9             88

SRTM          MONOKRISTALL   52            68            36            95

MRTM          DUSETOS        94            47            19            72

SRTM          BERKLIJ        71            31            40            45

MRTM          ATIA           21            32            28            74

Suda s vilovom 50%-75%, otsort v por vosrast

BATM          P.SAFRANOV     34            93            74            36

BATM          P.CAHCIBADZE   3             11            55            48

SRTM          KORIFENA       52            54            69            68

MRTM          DITUVA         73            26            62            18

Suda s vilovom 75%-100% v por vosrast

SRTM          TAVA           51            18            87            21

BATM          STARIJ ARBAT   1             40            94            59

SRTM          NEIRON         62            76            84            22


 
Дружить
Uchit.net в социальных сетях