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
Who is the best Attack on Titan Character?
lions [1.4K]

Answer:

Levi

Explanation:

Levi is just a massive W of a character

4 0
3 years ago
Read 2 more answers
What are tributaries
sukhopar [10]
Tributaries are rivers that flow into another river or another lake. Tributaries are common in any country. Tributaries are like roots of lakes that flows to somewhere else. It is like a distribution of water that scatters through streams and lands to a larger body of water.
5 0
3 years ago
Read 2 more answers
Who is the fan of Techno gamerz and Total gaming
Helen [10]
Over here lol- it’s pretty cool
6 0
3 years ago
failed logins or instances of denial of access to restricted files may be indicators of compromise. suggest where records of suc
algol [13]

As forensic evidence of suspected intrusions on a host system or network, indicators of compromise (IOCs) are used.

<h3>What is indicators?</h3>

System administrators and information security (InfoSec) experts can identify malicious activity such as intrusion attempts using these artifacts. IOCs are used by security researchers to more thoroughly examine the methods and behaviour of a certain malware.

IOCs also offer useful threat intelligence that can be disseminated around the community to help organizations develop their incident response and remediation plans.

Some of these artifacts can be seen on the system's event logs, time-stamped entries, apps, and services. Various tools that monitor IOCs are also used by infosec experts and IT/system administrators to help mitigate, if not stop, breaches or assaults.

Therefore, As forensic evidence of suspected intrusions on a host system or network, indicators of compromise (IOCs) are used.

To learn more about indicators, refer to the link:

brainly.com/question/28093573

#SPJ1

4 0
1 year ago
Technician A says that automotive engine blocks are usually classified by the number of cylinders the block. Technician B says t
viva [34]
<span>A. Both Technicians A and B is the answer</span>
8 0
3 years ago
Other questions:
  • Write a function called ReverseLetters that takes an input phrase consisting of a single word and reverses the sequence of lette
    15·1 answer
  • How do u change the level of education on Brainly. cuz i just finished elementry
    9·2 answers
  • If you are upgrading your operating system to Windows 7, you may not use the In-Place Upgrade Installation Option with
    14·1 answer
  • Write a program reverse-order.cpp which asks the user to input two dates (earlier date then later date). The program should repo
    13·1 answer
  • A ___ is the basic collective unit of data in a computer.
    12·1 answer
  • What was the first browser that allowed for graphics to be viewed on the web?
    14·2 answers
  • How do i unblock website on my school computer
    7·2 answers
  • What type of network is capable of delivering voice, video streams, text, and graphics between many different types of devices o
    15·1 answer
  • When designing your navigation, your primary objective should be to include keywords for search engines.
    6·1 answer
  • What is a single-user computer?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!