Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - C language: given an integer array b [n], the subsequence of continuous equal elements in b is called a platform. Write a program to find the length of the longest platform in B.
C language: given an integer array b [n], the subsequence of continuous equal elements in b is called a platform. Write a program to find the length of the longest platform in B.
int temp 1;

int length = 0;

int length 2 = 0;

for(int I = 0; I & ltn;; i++)

{

If (i == 0)

temp = b[I];

other

{

if(temp == b[i])

Length++;

other

{

If (length & gt length 2)

Length2 = length;

Length = 2;

}

}

}