write an algorithm ( pseudocode in c) which counts the number of element larger than P bit smaller than Q.
PSEUDOCODE :
Step1:Declare an array of size 10.
int arr[10];
Step2:Declare variables p and q.
int p,q;
step 3:Declare and initialise count to 0.
int count=0;
step4.Get all elements of array from user.
for(int i=0;i<10;i++){
scanf("%d",&arr[i]); }
step5:Repeat 10 times.
a)check element is greater than p and less than q.
if((a[i]>p)&&(a[i]<q));
b)if condition is true,increment value of count,
count++;
c)else continue.
step 6:end loop.
step 7:Print count.
Step:8:END
Get Answers For Free
Most questions answered within 1 hours.