Develop and write the pseudo code for an algorithm that can

Develop and write the pseudo code for an algorithm that can take a list of 10 integers and determine how many are even numbers.

Solution

1.START

3.DECLARE i,j,int arr[10],flag.

4.DISPLAY \"Enter the intergers\"

5.for(i=0;i<10;i++)

6.READ arr[i]; //loop takes ten integers

7.for(i=0;i<10;i++)

flag=0;

for(j=i+1;j<10;j++)

IF arr[i]==arr[j] then

flag=1;

IF flag==0 then

sum=sum+arr[i];// if any integer is repeated that is not counted.

End for

9.IF number MOD 2 =0 then

DISPLAY \"The integer is even\"

ELSE \"Normal integer \"

End IF

10.stop

 Develop and write the pseudo code for an algorithm that can take a list of 10 integers and determine how many are even numbers. Solution1.START 3.DECLARE i,j,i

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site