ответ: 9
Объяснение:
X=1i=1While i<4:x=x*2i=i+1x=x+1Изначально X = 1, i = 1. Потом идет цикл, который умножает x на 2 и увеличивает i на 1, пока выполняется условие (i<4). Получается:
i=1 x=1 i<4?ДА => x = x*2 = 1*2 = 2 i = i+1 = 1+1 = 2
i=2 x=2 i<4?ДА => x = x*2 = 2*2 = 4 i = i+1 = 2+1 = 3
i=3 x=4 i<4?ДА => x = x*2 = 4*2 = 8 i = i+1 = 3+1 = 4
i=4 x=8 i<4?НЕТ => ВЫХОД
x = x+1 = 8+1 = 9
или так:
PascalABC.NET beginvar a:= ArrRandom(5,-100,100);a.Println;a.Count(x->(x.IsOdd)and(x>0)).Printend.Примеры работ:
begin
readln(a,b,c,d,e,f);
write(a*b*c*d*e*f);
end.
На Java
import java.util.Scanner;
class Main{
private static Scanner scn;
public static void main(String args[]){
scn = new Scanner(System.in);
int a = scn.nextInt();
int b = scn.nextInt();
int c = scn.nextInt();
int d = scn.nextInt();
int e = scn.nextInt();
int f = scn.nextInt();
System.out.println(a*b*c*d*f*e);
}
}
ПРОГРАММА к схеме:
var a,b,c,d,e,f,s:integer;
begin
readln(a,b,c,d,e,f);
s:=a*b*c*d*e*f;
write(s);
end.