Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <time.h>
- int main()
- {
- int size;
- int low;
- int high;
- int flag=0;
- int *p;
- printf("enter size of array:\n");
- scanf("%d",&size);
- while (size>=10){
- scanf("%d",&size);
- }
- printf("enter the number low:\n");
- scanf("%d",&low);
- printf("enter the number low:\n");
- scanf("%d",&high);
- while (flag!=0){
- if ((high-low)>=size/2 && (high-low)<size)
- flag=1;
- else
- {
- printf("enter the number low:\n");
- scanf("%d",&low);
- printf("enter the number low:\n");
- scanf("%d",&high);
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement