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
The overall visual look of a chart in terms of its graphic effects, colors, and backgrounds is the:
Liula [17]
The answer to this is b!!
8 0
4 years ago
The main advantage of using the Gray code is:
zzz [600]

Answer:

a) only one digit changes as the number increases.

Explanation:

Let us first understand what does it mean when we say only one digit changes as the number increases using the Reflected Binary code (also called Gray code)

consider the 4 bit representation of Binary coded decimal and RB codes

Decimal | Binary code  | Reflected binary (RB) code

0              0000               0000

1               0001                0001

2              0010                0011

3              0011                 0010

4              0100                0110

5              0101                 0111

As you can see in the case of binary codes, there are more than one digit changes between two consecutive numbers.

But notice that in the case of Gray codes, there is always one digit change between two consecutive numbers.

The problem with the binary codes is that the more digits change there states the greater is the chance of ending up with random transitional values rather than real values which can be incorrect. The RB code solves this problem by only changing one digit at a time.

The RB code is widely used in linear and rotary encoders, error correction and digital logic design.

8 0
3 years ago
Convert (520)10 into base 16​
kakasveta [241]
The base-10 value of 52010 is equal to base-16 value of 20816.
3 0
3 years ago
Read 2 more answers
Ugh these are hard questions
SVEN [57.7K]
9 is B, and 10 is D I think ... brainliest pls
8 0
3 years ago
Explain why you would need both public and privatemembers in a class.
inn [45]

Answer:

In a class, a public data member are those member which can be accessible to all other classes in the computer program. By using public data member a class can modify its data member and its member function. Hence, the key member in class are not be declared as public.  

It is declared as:

class public

{

 public;    // public access specifier

  int a,b;      // Data Member

}

In a class, a private data member are only access by member function inside the class as, it is completely invisible from the outside world. In this, member function and class variable are private by default.

class private

{

private;   // private access specifier

 int a,b;    // Data Member

}

8 0
3 years ago
Other questions:
  • You should type------ space(s) after a period at the end of a sentence.
    13·2 answers
  • The point where a row and column intersect is called a/an A. cell. B. axis. C. element. D. table.
    7·2 answers
  • What does eco driving mean
    5·1 answer
  • What is out put.what is data. what is microprocessor
    14·1 answer
  • which of the following is the term used for a set of programs that acts as an interface between the applications that are runnin
    7·1 answer
  • How do you understand a scientific problem? Give two (2) examples of a scientific problem you
    10·1 answer
  • Jim wants to buy a car, but he’ll probably only need it for a couple of years. He has a short commute to work, so he won’t be pu
    5·1 answer
  • Aisha designed a web site for her school FBLA club. Which item should Aisha consider for improved responsive design?
    6·2 answers
  • I need help building a computer what are some good parts?
    9·1 answer
  • Among the aforementioned parts, the FLASH DRIVE is the most common. Why do you think a flash drive will be essential for you as
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!