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
denis-greek [22]
3 years ago
5

One line of code is missing (marked in

Computers and Technology
1 answer:
Harman [31]3 years ago
4 0

Answer: num1.plus(1);

Explanation:

You might be interested in
Varied amount of input data Statistics are often calculated with varying amounts of input data. Write a program that takes any n
Gnom [1K]

In Python 3.8:

nums = list(map(int, input("Enter your numbers space separated: ").split()))

print(f"The largest number is {max(nums)} and the average of all the numbers entered is {sum(nums)/len(nums)}")

7 0
3 years ago
Write a program that asks the user to enter a series of numbers separated by commas. Here is an example of valid input: 7,9,10,2
alex41 [277]

Answer:

Here is the JAVA program. Let me know if you need the program in some other programming language.

import java.util.Scanner; // used for taking input from user

public class Main{ //Main class

public static void main(String[] args) {//start of main() function body

  Scanner scan = new Scanner(System.in); // creates a Scanner type object

   String input; // stores input series

    int sum = 0; //stores the sum of the series

    System.out.println("Enter a series of numbers separated by commas: "); //prompts user to enter a series of numbers separated by comma

     input = scan.nextLine(); //reads entire input series

     String[] numbers = input.split("[, ]"); //breaks the input series based on delimiter i.e. comma and stores the split sub strings (numbers) into the numbers array

   for (int i = 0; i < numbers.length; i++) { //loops through each element of numbers array until the length of the numbers reaches

          sum += Integer.parseInt(numbers[i]); } // parses the each String element of numbers array as a signed decimal integer object and takes the sum of all the integer objects

     System.out.println("Sum of all the numbers: " + sum);  } } //displays the sum of all the numbers

Explanation:

The program prompts the user to enter a series separated by commas.

Then split() method is used to split or break the series of numbers which are in String form, into sub strings based on comma (,) . This means the series is split into separate numbers. These are stored in numbers[] array.

Next the for loop iterate through each sub string i.e. each number of the series, converts each String type decimal number to integer using Integer.parseInt and computes the sum of all these integers. The last print statement displays the sum of all numbers in series.  

If the input is 7,9,10,2,18,6

Then the output is: 7+9+10+2+18+6

sum = 52

The program and its output is attached.

8 0
3 years ago
Which of the following is the ribbon path to the cell styles button? (home tab | styles group) (styles tab | home group) (home t
Alekssandra [29.7K]
I guess you talk about Excel. I'm pretty sure that that the path to the cell styles button looks like this <span>home tab | styles group. It's the most common pass. But in other cases, it depends on the software you use.</span>
5 0
3 years ago
What would you NOT use a router for?
Lena [83]
To run applications on your computer

-Apps will run independently from a router.
8 0
3 years ago
What language do the Vikings speak in the game " For Honor"?
aivan3 [116]
In the game the Vikings speak icelandic
3 0
3 years ago
Read 2 more answers
Other questions:
  • Select all that apply. To assist in document sharing, you should?
    12·2 answers
  • You find a list of numbers on the kitchen counter, but you aren’t sure what the numbers represent. This is an example of:
    11·2 answers
  • File compression is only available on hard-disk drives. <br><br><br> a. True <br><br><br> b. False
    6·1 answer
  • Why don't I have friends?
    11·2 answers
  • Why media is far from government​
    6·2 answers
  • :|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|
    5·2 answers
  • Apart from mATX and ATX what are the other form factors of power supply
    7·1 answer
  • What is alternative name of home page<br><br>​
    7·1 answer
  • Why is it important to enforce access controls and to keep logs regarding who has access to data closets
    14·2 answers
  • How can the absolute age of a rock be determined ?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!