Показать сообщение отдельно

  #2  
Старый 05.06.2010, 22:31
Ins3t
Участник форума
Регистрация: 18.07.2009
Сообщений: 272
Провел на форуме:
2083691

Репутация: 330
По умолчанию

#1

Код:
input "Enter arraySize:", arraySize
DIM array(ARRAYSIZE) AS INTEGER

for i = 1 to arraySize
    input "-->", array(i)
next i

for i = 1 to arraySize
    for k = 1 to arraySize - 1
        if array(k) > array(k+1) then
            SWAP array(K), array(K + 1)
        end if
    next k
next i

for i = 1 to arraySize
    print "--->"; array(i)
next i
#2

Код:
input "Enter X:", X
input "Enter Y:", Y

if x > y then
    max = X
    min = Y
    else
    max = Y
    min = X
end if

X = min
Y = max

print "X:"; x; "Y:";y
#3

Код:
input "Enter N:", N
sum = 0
DIM array(N)
for i = 1 to N
    input "-->", array(i)
next i

while n > 0
    print array(n)
    sum = sum + array(N)
    N = N - 1
wend
print "SUM is "; sum
#4

Код:
input "Enter A:", A
input "Enter B:", B

if a < 0 then
    A = A ^ 2
    else
    A = A ^ 3
end if

if b < 0 then
    B = B ^ 2
    else
    B = B ^ 3
end if

print "A = "; a; "B = "; b
R166000694685

Последний раз редактировалось Ins3t; 05.06.2010 в 23:51..
 
Ответить с цитированием