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]
4 years ago
5

Implement a function that meets the specifications below.

Computers and Technology
1 answer:
astraxan [27]4 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
Give your definition of a stored procedure. Based on the Academic Database, identify and describe a scenario where it would be n
Tems11 [23]

, identify and describe a scenario where it would be

8 0
3 years ago
What are the different parts of a word processing program?<br><br> I need this ASAP please help!!
uranmaximum [27]

Answer:

The basics of the Word window

Title bar. This displays the document name, followed by a program name.

Menu bar. This contains a list of options to manage and customize documents.

Standard toolbar. ...

Formatting toolbar. ...

Ruler. ...

Insertion point. ...

End-of-document marker. ...

Help.

3 0
3 years ago
Can you help me with these AP Computer Science Questions. (THIS IS DUE BY 1:30 PM today) you have to evaluate the Boolean Expres
vfiekz [6]

Answer + Explanation:

'and' -> both statements are 'True' to evaluate as 'True'.

'or' -> at least one statement is 'True' to evaluate as 'True'.

1. True (grade has the value of 82, so the statement evaluates to 'True').

2. True (Both statements are true, this expression evaluates to 'True').

3. False (Both statements are false, this expression evaluates to 'False').

4. True (the != operator means <em>not equal.</em> Since the 'name' variable holds the string 'Rumpelstiltskin', name != 'Rumpelstiltskin' evaluates to 'False'. The 'not' operator returns the opposite of the given Boolean expression, so this expression evaluates to 'True').

5. True (name == 'Rumpelstiltskin' evaluates to 'True', so this expression is true).

6. False (All statements evaluate to 'False').

7. True (All statements evaluate to 'True').

8. False (All statements evaluate to 'True' except for <em>not(x == - 3) </em>which evaluates to 'False', so the whole statement now becomes false).

9. True (<em>grade+5 < 90 and grade >= 80 </em>evaluates to 'True', so this whole expression becomes true).

10. True (<em>grade > 0 and x % 2 == 1 </em>evaluates to 'True')

Hope this helps :)

7 0
3 years ago
Which element always appears to start on a new line in the browser window
pantera1 [17]
C hope this helps bye
5 0
3 years ago
Describe Variables in detail. Give examples
KATRIN_1 [288]

Answer:

A variable is a quantity that may be changed according to the mathematical problem. The generic letters which are used in many algebraic expressions and equations are x, y, z. In other words, a variable is a symbol for a number where the value is not known. For example, x + 5 = 10. Here “x” is a variable.

Explanation:

please mark me brainliest

3 0
3 years ago
Read 2 more answers
Other questions:
  • Jessica wants to purchase a new hard drive. She wants a drive that has fast access because she will use it to edit videos on her
    12·1 answer
  • What the address for dns server that the eorkstation will use?
    10·1 answer
  • Powerpoint increased the weight of a line in ____ increments.
    13·1 answer
  • Explain Spreadsheet and its Basics
    13·1 answer
  • What is essence of computer systems and networks?​
    9·1 answer
  • ELO 3.6 Which type of iSCSI name requires a registered domain name to generate a unique iSCSI identifier?
    12·1 answer
  • An example of a _________________ impact is when a consumer wants to buy a product on the internet but is afraid the company won
    8·2 answers
  • Local Area Networks (LANs)
    11·2 answers
  • Examine the weather map.
    12·2 answers
  • What open source format has multiple versions for storing audio and video content?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!