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
When the tcp\ip translates a network layer address into a data link layer address (after not finding an entry for the network la
Pavel [41]
When the network stack translates an IP address (network address) to a MAC address (data link address) it sends a broadcast using ARP to all devices on the subnet asking who has the specified IP address.  The device with that IP address will then respond with it's MAC address to the ARP message's source.

With this in mind the answer to your question would either be broadcast or ARP request depending on what you have been learning in class.
6 0
3 years ago
What are the benefits of PowerPoint
Leto [7]
I guess you could say it offers a easier and faster way to facilitate the spread of information through visual displaying of the said information.
5 0
3 years ago
Read 2 more answers
Identify the menu under which you'll find the Header and Footer option.
Genrish500 [490]

The answer is B. View.

4 0
3 years ago
Write a program that prompts the user to input two numbers, a numerator and a divisor. Your program should then divide the numer
12345 [234]
What language? JavaScript? Python?
8 0
3 years ago
Read 2 more answers
Write a public static method named insert. The insert method should have the signature insert(String[] words, String newWord, in
Mumz [18]

Answer:

Explanation:

The following code was written in Java and performs the exact requirements listed in the question. It has also been tested by the runner code and works perfectly.

public static boolean insert(String[] words, String newWord, int place) {

               if (place > words.length) {

                   return false;

       } else {

                   for (int x = words.length - 1; x >= 0; x--) {

                       if (place == x) {

                           words[x] = newWord;

                           break;

                       } else {

                           words[x] = words[x-1];

                       }

                   }

                   return true;

               }

   }

5 0
3 years ago
Other questions:
  • A(n) ____________________ or cryptosystem is an encryption method or process encompassing the algorithm, key(s) or cryptovariabl
    11·1 answer
  • What are some causes of the number of bytes on the wire exceeding the number of bytes being captured?
    6·2 answers
  • What should be included as part of the approval process? in relation to computer forensics
    14·1 answer
  • A large IPv4 datagram is fragmented into 4 fragments at router 1 to pass over a network with an MTU of 1500 bytes. Assume each f
    15·1 answer
  • After a chart has been inserted and formatted, is it possible to change the data range it refers to or to add new rows of data?
    14·1 answer
  • Solve the recurrence relation.<br> S(1)=1<br> S(n)= S(n-1)+(2n-1) for n&gt;=2
    13·1 answer
  • HURRY!!!!!!!!!!!!!
    15·1 answer
  • Difference between statement x=+5 and x+=5​
    7·1 answer
  • Think back on the Font Tester App. Can you think of an example of another app or feature of an app which would use a loop to con
    14·1 answer
  • There are parallels between the trust models in Kerberos and Public Key Infrastructure (PKI). When we compare them side by side,
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!