Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Rahul255 authored Nov 15, 2018
1 parent 6e30644 commit d555818
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions 344A.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#include <iostream>

using namespace std;

int main()
{
int n,a[100],c=0,d,i;
cin>>n;
for(i=0;i<n;i++)
{
cin>>a[i];
}
for(i=0;i<n;i++)
{
if(a[i]!=a[i+1])
{
c++;
}

}
cout<<c;
return 0;
}

0 comments on commit d555818

Please sign in to comment.