DATA 101,98,100,108,97,106,99,100,112,96,107,98 DIM a(1 TO 12) AS INTEGER DIM b(1 TO 12) AS INTEGER, c(1 TO 12) AS INTEGER DIM i AS INTEGER, ib AS INTEGER, ic AS INTEGER CLS ib = 0: ic = 0 FOR i = 1 TO 12 READ a(i) SELECT CASE a(i) CASE 100 ib = ib + 1 b(ib) = i CASE IS > 100 ic = ic + 1 c(ic) = i END SELECT NEXT i
PRINT "План (100%) в месяцах: "; FOR i = 1 TO ib PRINT b(i); NEXT i PRINT PRINT "перевыполнение плана в месяцах "; FOR i = 1 TO ic PRINT c(i); NEXT i END
Результат выполнения программы: План (100%) в месяцах: 3 8 перевыполнение плана в месяцах 1 4 6 9 11
DIM a(1 TO 12) AS INTEGER
DIM b(1 TO 12) AS INTEGER, c(1 TO 12) AS INTEGER
DIM i AS INTEGER, ib AS INTEGER, ic AS INTEGER
CLS
ib = 0: ic = 0
FOR i = 1 TO 12
READ a(i)
SELECT CASE a(i)
CASE 100
ib = ib + 1
b(ib) = i
CASE IS > 100
ic = ic + 1
c(ic) = i
END SELECT
NEXT i
PRINT "План (100%) в месяцах: ";
FOR i = 1 TO ib
PRINT b(i);
NEXT i
PRINT
PRINT "перевыполнение плана в месяцах ";
FOR i = 1 TO ic
PRINT c(i);
NEXT i
END
Результат выполнения программы:
План (100%) в месяцах: 3 8
перевыполнение плана в месяцах 1 4 6 9 11
const
pi=3.14159265358979;
var
a,b,c:integer;
cos1,cos2,cos3:real;
begin
repeat
write ('A = ');readln(a);
write ('B = ');readln(b);
write ('C = ');readln(c);
if (a+b<=c) or (a+c<=b) or (b+c<=a) then writeln ('The triangle doesnt exist');
until (a+b>c) and (a+c>b) and (b+c>a);
cos1:=((a*a+b*b-c*c)/(2*a*b))*180/pi;
cos2:=((a*a+c*c-b*b)/(2*a*c))*180/pi;
cos3:=((b*b+c*c-a*a)/(2*b*c))*180/pi;
if (cos1=0) or (cos2=0) or (cos3=0) then writeln ('Прямоугольный') else
if (cos1<0) or (cos2<0) or (cos3<0) then writeln ('Тупоугольный') else
writeln ('Остроугольный');
readln;
end.