1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
marin [14]
3 years ago
5

Implement a function that meets the specifications below.

Computers and Technology
1 answer:
astraxan [27]3 years ago
4 0
Let me help you!
Since you did not specify what progamming language to use, I will do it in JAVA :>

import javax.swing.JOptionPane

public class Sum //The name of your program is Sum
{
//Variable Declaration
int s, sum, fCONTROL, control;

control = Integer.parseInt(JOptionPane.showMessageDialog("Please enter how many times you want to enter a number));
for(fCONTROL = 0; fCONTROL < control; fCONTROL++) //This is a for loop
{
//INPUT STATEMENT
s = Integer.parseInt(JOptionPane.showInputDialog("Please enter a number));
//PROCESS STATEMENT
sum = sum + s;
}//End of for loop
//OUTPUT STATEMENT
if(sum%2==0 || sum%2!=0)
{
JOptionPane.showMessageDialog(sum);
}
else
JOptionPane.showMessageDialog("You did not input an integer!");

}//End of program

You can test this is JCreator; it works and i stand by it. Good luck!
You might be interested in
Anyone know why my pc won’t start up I upgraded my ram and everything seems fine
ser-zykov [4K]

Answer:

RAM Slots

Explanation:

If you upgraded RAM then check if RAM is in correct slots according to the Motherboard Manual, i had the same issue when i replaced my RAM.

4 0
2 years ago
please help me with the 2 questions above. if you know a lot about game design I have lots more questions!
ratelena [41]

1 is A

2 is probably C or B but I don't use Unity so I can't help much with that one.

3 0
3 years ago
Task location is less important than the task language. T or F
Arlecino [84]
I really think its false because of the task  language you need to know
8 0
3 years ago
HELP PLEASE
GaryK [48]

Answer:

B

Explanation:

5 0
3 years ago
2.19.5: Circle Pyramid 2.0
liubo4ka [24]

Answer:

def move_to_row(num_circle):

x_value = -((num_circle*50)/2)

y_value = -250 +(50*row_value)

penup()

setposition(x_value,y_value)

pendown()

def draw_circle_row(num_circle):

for i in range(num_circle):

endown()

circle(radius)

penup()

forward(diameter)

#### main part

speed(0)

radius = 25

diameter = radius * 2

row_value = 1

num_circle = int(input("How many circle on the bottom row? (8 or less): "))

penup()

for i in range(num_circle):

move_to_row(num_circle)

row_value=row_value+1

draw_circle_row(num_circle)

num_circle=num_circle-1

8 0
3 years ago
Other questions:
  • What software is typically used for larger systems?
    11·1 answer
  • Suppose that you created an robot that was so advanced it could act independently in very complex situations. It made its own de
    9·1 answer
  • Why is exception handling an issue for testers in object-oriented developments?
    15·1 answer
  • Press the _______ key to move to the next cell in a row.
    12·2 answers
  • What is the use of html in websites
    15·2 answers
  • What kind of information can be found in a ROM:
    14·1 answer
  • Hank is the network administrator responsible for managing the web server cluster for an e-commerce company. He’s worried about
    9·1 answer
  • Consider the following code.
    7·2 answers
  • Question #1 Mutiple Select Which features are important when you plan a program? Select 4 options. Knowing what you want the pro
    5·1 answer
  • with the current computer development, explain 5th areas where computer is applied for the social economic dwvelopment in societ
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!