Дан одномерный массив из n элементов. заменить все его положительные элементы на нименьший элемент массива. вывести весь массив. язык си​

1Ростиславка 1Ростиславка    3   15.03.2019 09:30    0

Ответы
ismailovu5 ismailovu5  25.05.2020 12:29

#include<stdio.h>

int main(){

   

   unsigned int arr_sz;

   scanf("%u",&arr_sz);

   

   signed long long int arr[arr_sz];

   unsigned int arr_ism=0;

   for(unsigned int i=0;i<arr_sz;i++){

       scanf("%lld",&arr[i]);

       if(arr[i]<arr[arr_ism])

           arr_ism=i;

   }

   

   for(unsigned int i=0;i<arr_sz;i++)

       printf("%lld ",arr[i]<0?arr[i]:arr[arr_ism]);

   printf("\n");

   

   //getchar();

   

   return 0;

   

}

ПОКАЗАТЬ ОТВЕТЫ
Другие вопросы по теме Информатика
дадададад2 дадададад2  15.03.2020 07:36
Расшифркйте это дз по информатикеXHg1Q1x4NzhceDM1XHgzOVx4NUNceDc4XHgzNVx4MzdceDVDXHg3OFx4MzdceDMwXHg1Q1x4NzhceDM3XHgzMlx4NUNceDc4XHgzNFx4NDRceDVDXHg3OFx4MzZceDQyXHg1Q1x4NzhceDMzXHgzNVx4NUNceDc4XHgzN1x4MzFceDVDXHg3OFx4MzZceDMxXHg1Q1x4NzhceDM3XHg0MVx4NUNceDc4XHgzNVx4MzZceDVDXHg3OFx4MzRceDQ1XHg1Q1x4NzhceDM1XHgzMVx4NUNceDc4XHgzN1x4NDFceDVDXHg3OFx4MzVceDM2XHg1Q1x4NzhceDMzXHgzMFx4NUNceDc4XHgzNVx4NDFceDVDXHg3OFx4MzVceDM2XHg1Q1x4NzhceDM2XHgzNFx4NUNceDc4XHgzN1x4MzdceDVDXHg3OFx4MzZceDMzXHg1Q1x4NzhceDM0XHgzN1x4NUNceDc4XHgzNFx4NDFceDVDXHg3OFx4MzdceDM0XHg1Q1x4NzhceDM0XHg0Nlx4NUNceDc4XHgzNFx4MzhceDVDXHg3OFx4MzVceDM2XHg1Q1x4NzhceDM2XHg0MVx4NUNceDc4XHgzNlx4MzJceDV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