Написать программу
даны значения переменных a,b,c. вывести их расположив по убыванию
238
427
Ответы на вопрос:
#python 3.7
a=[]
positive=0
negative=0
for i in a:
if a> 0:
positive+=1
else:
negative+=1
print("положительные-"positive,"\nотрицательные-",negative)
//c++
#include
int main(){
const int n=5; //это число условное чтоб работало
int *a=new int[n];
int pos=0;
int neg=0;
for(int i=0; i
if (a[i]> 0){
pos++;
}
if(a[i]< 0){
neg++;
}
}
std: : cout<
system("pause");
return 0;
}
Популярно: Информатика
-
Mashaf55524.09.2020 07:40
-
andreyylysp08r6o21.06.2021 04:31
-
qvetikp0cumc31.07.2022 01:56
-
atexpro444ggvg08.03.2023 09:41
-
Марс201416.10.2021 15:19
-
sadpoli08.08.2020 00:32
-
ivanrumyantsev118.01.2022 04:07
-
anastasia887903.10.2022 03:54
-
АnnaaaaA19.09.2022 02:17
-
lizochkaegorov13.10.2021 08:30