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
Lemur [1.5K]
3 years ago
11

Write an algorithm to sum to values

Computers and Technology
1 answer:
Elis [28]3 years ago
5 0

Answer:

There is no need to make an algorithm for this simple problem. Just add the two numbers by storing in two different variables as follows:

Let a,b be two numbers.

c=a+b;

print(c);

But, if you want to find the sum of more numbers, you can use any loop like for, while or do-while as follows:

Let a be the variable where the input numbers are stored.

while(f==1)

{

printf(“Enter number”);

scanf(“Take number into the variable a”);

sum=sum+a;

printf(“Do you want to enter more numbers? 1 for yes, 0 for no”);

scanf(“Take the input into the variable f”);

}

print(Sum)

Explanation:

hi there answer is given mar me as brainliest

You might be interested in
Linda is a core member of a project. She estimates the cost of the project, creates project requirements, and notes risks. What
lord [1]

Explanation:

no linda is the core member not rhe project

4 0
3 years ago
I need help in Jumbotron: Paragraph. The question is:
Aleksandr-060686 [28]
<span>.jumbotron p
{
color: #fff;
font-size: 20px;
}</span>
6 0
3 years ago
Explain the difference between "sleep mode" and "shutdown "
kari74 [83]

Answer:

When you shut down your electronic, all your open programs close and the electronic shuts down your operating system. An electronic that's shut down uses almost no power. In sleep mode, the electronic enters a low-power state. The electronics state is kept in memory.

5 0
2 years ago
A main reason careers in Information Technology are growing faster than average is
Scorpion4ik [409]
Technology has become such a major part of everyday life
8 0
3 years ago
Write a method starString that accepts an integer parameter n and returns a string of stars (asterisks) 2n long (i.e., 2 to the
lys-0071 [83]

Answer:

public class Main

{

public static void main(String[] args) {

 System.out.println(starString(4));

}

public static String starString(int n){

    double p = Math.pow(2,n);

    String s = "";

    for(int i=0; i<p; i++)

        s += "*";

       

   return s;

}

}

Explanation:

Create a method named starString that takes an integer parameter, n

Get the 2 to the nth power using pow method and set it to the p

Create an empty string that will hold the asterisks

Create a for loop that will iterate p times. Inside the loop, concatenate an asterisk to the s

Return the s

Inside the main method, call the method with an integer parameter

4 0
3 years ago
Other questions:
  • John works for Internal Computer Specialists, which focuses on helping small business owners resolve MIS infrastructure issues.
    12·1 answer
  • What is the drawback of the linear model?
    5·2 answers
  • Type the correct answer in the box. Spell all words correctly.
    11·1 answer
  • An information- and communication-based electronic exchange environment mostly occupied by sophisticated computer and telecommun
    13·1 answer
  • Huan wants to enter the science fair at his school. He has a list of ideas for his project. Which questions could be answered th
    14·1 answer
  • A TCP ________ segment is a request to the other transport process to close a connection. ACK FIN SYN CLS
    15·1 answer
  • • &gt; Four 240-pin DDR3 SDRAM DIMM sockets arranged in two channels • &gt; Support for DDR3 1600+ MHz, DDR3 1333 MHz, and DDR3
    14·1 answer
  • What does the National Institute of Standards and Technology do? Promotes innovation by advancing measurement standards promotes
    15·2 answers
  • If a citation has a volume, title, and page numbers, it is a:
    9·2 answers
  • The tools, skills, knowledge, and machines created and used by humans is known as.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!