Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write an algorithm to count the number of values that are odd in a list of 20 in

ID: 3659879 • Letter: W

Question

Write an algorithm to count the number of values that are odd in a list of 20 integers. You do NOT need to prompt the user for numbers. You can set them yourself in the program. The display should say: "The list of 20 values has X number of odd integers!", where X is the count you determined in the logic. Provide step by step instructions accurately enough that any programmer can pick up these instructions and code in any programming language. Number your steps. Keep your algorithm simple. Using Java, implement the algorithm you designed above.

Explanation / Answer

public class Odd { public static void main(String args[]) { int[] a={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20}; int od=0,i; for(i=0;i
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote