Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define _CRT_SECURE_NO_WARNINGS
- #include <stdio.h>
- #include <stdlib.h>
- #include <locale.h>
- int main()
- {
- system("color f0");
- setlocale(LC_ALL,"rus");
- int N;
- printf("Введите количество элементов:");
- scanf("%d",&N);
- int a[N];
- int i,K,L;
- printf("Введите минимальное число диапозона ",K);
- scanf ("%d",&K);
- printf("Введите максимальное число диапозона",L);
- scanf ("%d",&L);
- for (i = 0; i<N; i++)
- {
- printf("a[%d] = ", i);
- scanf("%d", &a[i]);
- }
- for (i = 0; i<N; i++){
- if(abs(a[i])>=K && abs(a[i])<=L )
- {
- printf("a[%d]= %d;",i,abs(a[i]));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement