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
myrzilka [38]
2 years ago
13

Write an algorithm and flowchart to calculate sum of two given numbers​

Computers and Technology
1 answer:
klio [65]2 years ago
7 0
Step 1: Start
Step 2: Declare variables num1, num2 and sum.
Step 3: Read values for num1, num2.
Step 4: Add num1 and num2 and assign the result to a variable sum.
Step 5: Display sum
Step 6: Stop
#include
int main()
{
int num1,num2,sum;
printf("\n Enter the first number to be added: ");
scanf("%d",&num1);
printf("\n Enter the second number to be added: ");
scanf("%d",&num2);
sum = num1 + num2;
printf("\n The sum of two numbers is: %d",sum);
return 0;
}
You might be interested in
You cannot advance slides during the slide show by pressing the PAGE DOWN key
noname [10]
<span>You cannot advance slides during the slide show by pressing the PAGE DOWN key.
This is a true statement.
</span>
4 0
3 years ago
A method a. may have zero or more parameters b. never has parameter variables c. must have at least two parameter variables d. m
Lynna [10]

Answer:

The answer is "Option a"

Explanation:

A method is a technique, that associated with both a message and an object. It includes information, behavior, and actions of an interface defining, how the object can be used, and wrong choices can be described as follows:

  • In option b, It includes parameters in the method.
  • In option c, It contains a parameter, that may be one or more.
  • In option d, It contains one parameter also.

5 0
3 years ago
Program to calculate series 10+9+8+...+n" in java with output
avanturin [10]

Answer:

import java.util.Scanner;

class Main {

 public static int calcSeries(int n) {

   int sum = 0;

   for(int i=10; i>=n; i--) {

     sum += i;

   }

   return sum;

 }

 public static void main(String[] args) {

   Scanner reader = new Scanner(System.in);

   int n = 0;

   do {

     System.out.print("Enter n: ");

     n = reader.nextInt();

     if (n >= 10) {

       System.out.println("Please enter a value lower than 10.");

     }

   } while (n >= 10);

   reader.close();

   System.out.printf("sum: %d\n", calcSeries(n));

 }

}

5 0
3 years ago
The various online technology tools that enable people to communicate easily via the Internet to share information and resources
seropon [69]

Answer:

Social media is the correct answer for the above question.

Explanation:

  • Social media is the media that is used to communicate with the other person with the help of an internet connection. There is so much software that gives this type of facility. for example whats up and twitter.
  • The above question asked about that technology which is used to connect the people to communicate and the technology is social media which gives the features to connect and communicate all over the world with the help of the internet. Hence "Social media" is the correct answer.
8 0
2 years ago
This code snippet is intended to calculate the balance of an account after twenty years of gaining interest. Select the statemen
Firlakuza [10]

Answer:

The answer to this question is the "years--;".

Explanation:

In the given question code the if we define the years--; and the rate of interest in the code so this program will return a value for example if we give rate of interest or rate to value 5 then the output of the code is 26532.977051  because it returns the double that is a floating-point value.  So the missing code for this question is "years--;".

 

8 0
3 years ago
Other questions:
  • How many apostrophes or quotation marks in a row should you use to begin and end a multi-line string?
    14·2 answers
  • Write a program that takes a date as input and outputs the date's season. The input is a string to represent the month and an in
    13·2 answers
  • #include &lt;iostream&gt;
    9·1 answer
  • Edhesive coding practice 3.4​
    12·1 answer
  • The material of this section assumes that search keys are unique. However, only small modifications are needed to allow the tech
    7·1 answer
  • Which quality allows programmers to modify a program as and when required
    11·2 answers
  • IMPORTANT!!<br><br> How can you get real answer keys for edmentum (plato) courses as a student?
    11·1 answer
  • What does the -pwd switch do? how can you make dsadd bring up a prompt asking for the users password?
    10·1 answer
  • The question is inside the screenshot
    13·1 answer
  • Hey guys, I don’t have a problem for you but If anyone knows do you still pass your grade level if you failed 1 class in the las
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!