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
How can improving one’s reasoning skills also improve one’s performance on the job?
jeka57 [31]

If improving their skills would help them be better at things, and have an easier or faster way to solve their problem

3 0
3 years ago
Read 2 more answers
Describe the importance of prioritizing your focus when designing for multiple purpose
sp2606 [1]
<span>While Designing for Multiple purpose the prioritizing our focus is an essential part, when missed can lead to vague information and may spoil the sole purpose of the product that was meant to be designed. Our focus should always point to the MVP or Minimum Viable Product that needs to be delivered and on top what type of aspects we bring in to serve the multiple purpose need. The focus on order of prioritization should never be compromised unless there is something very essential that was left without incorporating at the designing stage.</span>
3 0
3 years ago
A vehicle equipped with an electronically shifted transaxle stalls whenever slowing to a stop after being driven over 20 miles (
Olegator [25]

Answer:

Technician B only

Explanation:

6 0
3 years ago
Select the best answer that completes the following sentences. Wireless technology changed the workday to
Minchanka [31]

Answer: around the clock availability

Explanation: i got 100

6 0
3 years ago
Read 2 more answers
Andy is trying to put together a holiday gift knapsack (with W=8) for Sarah. He has n items to choose from, each with infinitely
Sever21 [200]

Answer:

See explaination

Explanation:

Given 3 items: {w1 = 1, v1 = 3}, {w2 = 3, v2 = 2}, {w3 = 4, v3 = 3}

Hence OPT(1) = 3, OPT(3) = 2, OPT(4) = 3

Recursive formula for OPT(k) to minimize value is

OPT(k) = INFINITE if k <= 0

= min(3 + OPT(k-1), 2 + OPT(k-3), 3 + OPT(k-4))

Let us calculate OPT(1) to OPT(8)

OPT(1) = 3

OPT(2) = min ( 3 + OPT(1), 2 + OPT(-1), 3 + OPT(-2)) = 6

OPT(3) = 2

OPT(4) = 3

OPT(5) = min ( 3 + OPT(4), 2 + OPT(2), 3 + OPT(1)) = min(6, 8, 6) = 6

OPT(6) = min ( 3 + OPT(5), 2 + OPT(3), 3 + OPT(2)) = min(9, 4, 9) = 4

OPT(7) = min ( 3 + OPT(6), 2 + OPT(4), 3 + OPT(3)) = min(7, 5, 5) = 5

OPT(8) = min ( 3 + OPT(7), 2 + OPT(5), 3 + OPT(4)) = min(8, 8, 6) = 6

3 0
3 years ago
Other questions:
  • Which three of the following are requirements for receiving federal financial aid for college education?
    14·2 answers
  • A(n) _____ is a simple database program whose records have no relationship to one another.
    10·1 answer
  • If you touch a downed power line covered or bare, what’s the likely outcome?
    10·2 answers
  • The drone intercepts at 1256 hour. what time do they plane to take control of the drone
    11·1 answer
  • What network monitoring technology enables a switch to copy and forward traffic sent and received on multiple interfaces out ano
    9·1 answer
  • What term is given to pieces of computer software that allow you to manage your e-mail from your computer?
    12·1 answer
  • The February Revolution occurred in January.<br><br><br> True<br> False
    5·2 answers
  • A sum amounts to ₹2400 at 15% simple interest per annum after 4 years fond the sum.​
    9·1 answer
  • You have a spreadsheet of x values that need to
    15·2 answers
  • CISC vs RISC processors might be used, and come up with environments where one processor would outperform the other.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!