Thursday, March 3, 2016

UVA 13012

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include<iostream>

using namespace std;

int main()
{
 int n,i,a[5];
 int sum=0;
 
 while(cin>>n)
 {
  for(i=0; i<5; i++)
  {
   cin>>a[i];
   if(a[i]==n) sum=sum+1;
  }
  cout<<sum<<endl;
  sum=0;
 }
 
 return 0;
}

No comments:

Post a Comment

Thank you for commenting. Please wait for response :)