Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java programming Write a Java program named Counter that performs the following tasks: [2, 1, 1, 1 Marks] a. Generates 15 random integer numbers (their

Java programming

Write a Java program named Counter that performs the following tasks: [2, 1, 1, 1 Marks] a. Generates 15 random integer numbers (their range must be between -10 and 10 inclusive) and store them in a single-dimensional array. b. Displays the array elements. c. Count and display how many negative numbers in the array. d. Calculate and display the sum of the odd numbers in the array. For example, if the random numbers were stored in the array are: -2 -8 3 -4 -6 3 -2 7 5 9 8 8 -5 7 -7 Then the program should display: The array elements are: -2 -8 3 -4 -6 3 -2 7 5 9 8 8 -5 7 -7 The number of negative numbers is: 7 The sum of the odd numbers is: 22

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Modeling And Design

Authors: Toby J. Teorey, Sam S. Lightstone, Tom Nadeau, H.V. Jagadish

5th Edition

0123820200, 978-0123820204

More Books

Students also viewed these Databases questions

Question

What is the Definition for Third Normal Form?

Answered: 1 week ago

Question

Provide two examples of a One-To-Many relationship.

Answered: 1 week ago