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
Why is the GPS so important today?
SIZIF [17.4K]

It allows us to precisely tell where places, people (under certain circumstances), etc. are. It is the most widely relied upon mapping system in the world. Using a GPS, you can find almost any plotted (known) location on the Earth. Most mapping operations rely on a GPS and would, otherwise, fail without it.

7 0
3 years ago
How to transfer crypto from coinbase to coinbase wallet
posledela

Answer:

Open Coinbase Wallet on your mobile device.

Tap to go to your Settings.

Tap Buy or Transfer.

Select the supported crypto.

Enter the amount you want to transfer then tap Continue.

Follow the remaining steps to complete your transfer.

7 0
2 years ago
Robert’s computer is not working properly. It has become too slow to respond to programs. What can he do to maintain his compute
ozzi

Answer: Utility Software

Explanation:

Utility software is software designed to help to analyze, configure, optimize or maintain a computer. It is used to support the computer infrastructure - in contrast to application software, which is aimed at directly performing tasks that benefit ordinary users.

3 0
3 years ago
The _______ command was developed by nicholas harbour of the defense computer forensics laboratory.
Lena [83]
Hi! The answer is dcfldd
3 0
3 years ago
What is the definition of a digital signal?
pashok25 [27]

Answer:

communication of the binary data via the voltage level for each time interval

Explanation:

5 0
3 years ago
Other questions:
  • Technician A says one disadvantage of fiber optic cables is that they are more expensive and very heavy. Technician B says one d
    6·1 answer
  • How is an interpreter different from a compiler?
    6·2 answers
  • Which is the last step in conducting a URL search?
    6·1 answer
  • COMPUTER ORGANIZATION &amp; ARCHITECTURE I<br>please help need the correct answers to all
    6·1 answer
  • The statement cout &lt;&lt; sales[0,3] + sales[1,3]; will __________. Use the following array named sales to answer this questio
    14·1 answer
  • In which step of web design is storyboarding helpful?
    14·1 answer
  • In a _______ format, the date line and the signature block are centered.
    6·1 answer
  • what does it mean if you get the brainlyest ?and why does everyone want it so bad? and how do i give it to someone?
    6·1 answer
  • Help me. thank you very much
    14·1 answer
  • Difference between software developer and software engineer.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!