diff --git a/G/04/02_domashno b/G/04/02_domashno new file mode 100644 index 000000000..c15894e9a --- /dev/null +++ b/G/04/02_domashno @@ -0,0 +1,20 @@ +#include + int main() + { + int n; + scanf("%d", &n); + int mas[n],i=0,p,b; + do + { + scanf("%d", &mas[i]); + if(mas[i]%2!=0) + i++; + }while(n>i); + for(p=0,i=n-1;i>=p;p++,i--){ + if(i!=p){ + b=mas[p]-mas[i]; + printf("%d\n" ,b);} + else printf("%d", mas[p]); + } + return 0; + }