Help me in solving PRACTICEPERF problem

My issue

how do i get the total outcome of the problem

My code

/* package codechef; // don't place package name! */

import java.util.*;
import java.lang.*;

/* Name of the class has to be "Main" only if the class is public. */
class Codechef
	public static void main (String[] args) throws java.lang.Exception
		// your code goes here
		int n[] = {12,15,8,10};
		for (int i =0;i<n.length ;i++ ){
		        int count=0;
		    if (n[i]>=10){
		        count = count+i;

Problem Link: PRACTICEPERF Problem - CodeChef

Hey you must use scanner class for taking the input from user
I mean you must take input from user
And the other thing here the logic is wrong

1 Like

okk thanks

1 Like