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
Stells [14]
3 years ago
15

Java

Computers and Technology
1 answer:
inna [77]3 years ago
3 0

Answer:

import java.util.Scanner;

public class num3 {

   public static void main(String[] args) {

     Scanner in = new Scanner(System.in);

       System.out.print("Enter two numbers: ");

       int num1 = in.nextInt();

       int num2 = in.nextInt();

       int sum = num1+num2;

       System.out.print("Do you want another operation: ");

       String ans = in.next();

       while(ans.equalsIgnoreCase("yes")){

           System.out.print("Enter two numbers:");

           num1= in.nextInt();

           num2 = in.nextInt();

           System.out.println("Do you want another operation: ");

           ans = in.next();

           sum = sum+(num1+num2);

       }

       System.out.println("sum = "+sum);

   }

}

Explanation:

In the program written in Java Programming language,

The scanner class is used to prompt and receive two numbers from the user which are stored as num1 and num2. Another variable sum is created to hold the sum of this numbers

Then the user is prompted to answer yes or no using Java's equal.IgnoreCase() method.

If the user enters yes, he/she is allowed to entered two more numbers that are countinually added to sum

If the user eventually enters a string that is not equal to yes. The loop terminates and the accumulated value of sum is printed.

You might be interested in
What is the difference of using Selection Tool and Direct Selection Tool?
kvv77 [185]

Answer:

The Selection tool will always select the object as a whole. Use this tool when you want to manipulate the entire object. The Direct Selection tool will always select the points or segments that make up a frame

Explanation:

6 0
3 years ago
Ali has created a small program in Python, but he wants to store his data in a multi-dimensional array. He would like to use adv
Dafna11 [192]

NumPy is the key scientific Python computing package. This makes things simpler to display large numbers of data in advanced maths and other operating types. These operations are typically extra efficient and less code-based than that of the built-in sequences in Python are possible, and the further discussion can be defined as follows:

  • It offers a multidimensional array object, as do variations such as masks and matrixes that can be used for different mathematical activities.
  • It is an external library of basic levels in Python used for complex mathematical procedures.
  • It has integrated functions that <em><u>convert various algorithms into arrays</u></em>.

So, the answer is "NumPy".

Learn more:

brainly.com/question/24817911

6 0
2 years ago
You are reluctant to write an extra credit book report because you are afraid that your language and punctuation skills are not
saveliy_v [14]

Answer

Spelling and Grammar checkers

Explanation

A word processor is a  software program  for editing, storing, manipulating, and formatting text entered from a keyboard for the purpose  providing the intended output. t allows users to create, edit, and print documents. It enables you to write text, store it electronically, display it on a screen,

Spelling and Grammar checkers are the inbuilt components of word processors programs for personal computers. They have Salient features that  helps in identifying grammatical errors and misspellings.


3 0
3 years ago
A(n) _____ is similar to a virus, except that it is an independent program that can be spread across computer networks without b
CaHeK987 [17]
The term you're looking for is worm
5 0
3 years ago
What is the meaning of HML​
trapecia [35]

Answer:

Explanation:

Hit my line

4 0
2 years ago
Read 2 more answers
Other questions:
  • What is the solubility of an empty soda can
    10·1 answer
  • Find the word-length 2's complement representation of each of the following decimal numbers:a. 845b. 15000c. 100d. -923
    8·2 answers
  • How can you achieve an effect like that shown in the image?
    7·2 answers
  • Each webpage is assigned a(n) ______, an address that identifies the location of the page on the Internet.
    6·1 answer
  • Type the correct answer in the box. Spell all words correctly.
    11·2 answers
  • You are purchasing several PC systems that will be used as thin clients in a large organization. Which hardware selection criter
    9·1 answer
  • Which of the following languages does not provide built-in-pattern matching operations (the language, although, has pattern matc
    14·1 answer
  • PLEASE HURRY!!!
    11·1 answer
  • A company has a website that has seen a large increase in visitors and they are concerned that if the trend continues, the web s
    13·1 answer
  • ____ uses a computer to design and test new products and modify existing ones. Computer-aided manufacturing Just-in-time design
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!