Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class HelloWorld{
- public static void main(String []args){
- int[] a = {3,5,6,7,1,6,8,11,1000,1,5,5,5342,56,3};
- int conta = 0;
- for (int i = 0; i < a.length; i++) {
- if (a[i] == 1 ) {
- conta++;
- }
- }
- System.out.println(conta);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement