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]
3 years ago
13

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

Computers and Technology
1 answer:
klio [65]3 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
Using your favorite imperative language, give an example of each of the following. (a) A lexical error, detected by the scanner
Travka [436]

Explanation:

a. int foo+; (foo+ is an invalid identifier because + is not a valid char in identifiers)

b. foo int; (Syntax error is any error where the syntax is invalid - either due to misplacement of words, bad spelling, missing semicolons etc.)

c. Static semantic error are logical errors. for e.g passing float as index of an array - arr[1.5] should be a SSE.

d. I think exceptions like NullReferenceException might be an example of DME. Not completely sure but in covariant returns that raise an exception at compile time (in some languages) might also come in this category. Also, passing the wrong type of object in another object (like passing a Cat in a Person object at runtime might qualify for DME.) Simplest example would be trying to access an index that is out of bounds of the array.

8 0
3 years ago
What two skills are most important for a meteorologist
Komok [63]

being able to find out the weather.


being able to wear fancy suits.

7 0
3 years ago
Read 2 more answers
A document that promises to pay specified sums of money on specified dates and is a debt to the issuer is called
MissTica
<span>A document that promises to pay specified sums of money on specified dates and is a debt to the issuer is called a bond</span>
6 0
3 years ago
A column to be used in a database is called the
Temka [501]

it is called an attribute

8 0
3 years ago
The most commonly used network topology where network endpoints connect to a central device is called
arsen [322]
That would be a star network. A star network isn't necessarily shaped like a star, of course, but like you mention this topology has a central device, usually a server of some sorts, and then many different endpoints coming out of that central device, such as the client computers for the server.
6 0
3 years ago
Other questions:
  • When the packet leaves the router, which source and destination ip addresses will be contained in the packet?
    9·1 answer
  • The underwriters laboratories (ul) requirement for ? ground-fault circuit interrupters (gfcis) is that tripping shall occur when
    5·1 answer
  • ________ are used to translate each source code instruction into the appropriate machine language instruction.
    11·1 answer
  • When I try to invite someone to be my friend on brainly, for some people, it says, "Somethings up. Invitation wasn't sent". Can
    8·1 answer
  • How can you ensure that your web pages are compliant with a w3c standard?
    9·1 answer
  • Create a program that will read in a Salesperson name, employment status (1=Full-time AND 2=Part-time) and the sales amount.
    5·1 answer
  • These data provides the responses of 10 students in class A and in class B who were asked how many hours they slept lastThese da
    6·1 answer
  • Lol fortnite really going UwU and anime
    12·2 answers
  • An instruction for the computer. Many commands put together to
    5·1 answer
  • If a company saw an online photo of you playing basketball, it might try to sell
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!