how can I write the algorithm within using array
a = 1 2
b = 8 2
result c = 0 1 //when element a=b result=1, else = 0
Please write the algorithm
Last edited on
first, create two arrays to accept the different inputs, then you loop through the arrays, comparing their elements. if they are all equal, do x, else do y.