You are on page 1of 2

Ex.No:1.

1
14.08.202
1
SUMMATION OF TWO NUMBERS

Aim :
To display summation of two numbers using C code

Algorithm :
1. Start
2. Declaration of Variables
3. Print “ Enter the First Number”
4. Input Num1
5. Print “Enter the Second Number”
6. Input Num2
7. Summation Num1+Num2
8. Print Summation
9. Stop
Program :
#include<stdio.h>
#include<conio.h>
void main()
{
int Num1,Num2,Summation;
clrscr();
printf("Enter the First Number\t");
scanf("%d",&Num1);
printf("\nEnter the Second Number\t");
scanf("%d",&Num2);
Summation = Num1 + Num2;
printf("\nSummation = %d",Summation);
}

Output :
Result :
Summation of two numbers being programmed using C and executed

Inference :

o Understood how to use printf() and scanf()statement


o The significance of clrscr() function is observed
o Learned to write basic c program for summation of two numbers.

You might also like