Advertisement
Guest User

kefa and first step_ codeforces

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