Advertisement
raihan02

UVA 13012 Identifying tea

Nov 15th, 2015
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. #include <stdio.h>
  2. int main()
  3. {
  4. int x , a[6] ,i , j;
  5.  
  6. while(scanf("%d" ,&x) == 1)
  7. {
  8. for(i = 0; i < 5; i++)
  9. {
  10. scanf("%d" ,&a[i]);
  11. }
  12. j = 0;
  13. for( i = 0; i < 5; i++)
  14. {
  15. if(x == a[i])
  16. {
  17. j++;
  18.  
  19. }
  20. }
  21. printf("%d\n",j);
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement