Answer to Question #3301 in Java | JSP | JSF for carla
How to calculate the total vote 33,51,43,22,61,51,47 in for loop?
1
2011-07-05T10:13:33-0400
public class Start {
& public static void main(String[] args)
& {
int[] anArray = {33,51,43,22,61,51,47};
int totalVote = 0;
& for(int i=0; i<anArray.length; i++)
& { totalVote+=anArray[i]; }
System.out.println("Vote= "+totalVote);
& }
}
Need a fast expert's response?
Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Learn more about our help with Assignments:
JavaJSPJSF
Comments
Leave a comment