0% found this document useful (0 votes)
8 views2 pages

Exp 5 PPS Lab

Uploaded by

hod cse
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views2 pages

Exp 5 PPS Lab

Uploaded by

hod cse
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

5. Design an algorithm and flowchart with example.

AIM:
To design an algorithm and flowchart for the addition the two numbers using C
language.

ALGORITHM:
Step 1: Start
Step 2: Declare variables N1, N2 and Sum.
Step 3: Read values for N1, N2.
Step 4: Add N1 and N2 and assign the result to a variable Sum.
Step 5: Display Sum
Step 6: Stop

FLOWCHART:

PROGRAM:
#include <stdio.h>
int main()
{
int N1, N2, Sum;
printf("\n Enter the First Number: ");
scanf("%d",&N1);
printf("\n Enter the Second Number: ");
scanf("%d",&N2);
Sum = N1 + N2;
printf("Sum of Numbers %d + %d = %d", N1,N2, Sum);
return 0;
}

OUTPUT:
Enter the First Number: 20
Enter the Second Number: 20
Sum of Numbers 20 + 20 = 30

RESULT:
Thus the designing an algorithm and flowchart for the addition the two numbers using
C language has been executed and verified successfully.

You might also like