Practical No.-3
Aim

: To demonstrate the program for adding
two number.

Source code :

#include<iostream.h>
#include<conio.h>
void main()
{
int a, b,sum;
cout <<”Enter the value of a ”;
cin>>a;
cout<<”Enter the value of b”;
cin>>b;
sum=a+b;
cout<<”sum”<<sum;
}

Output

:

Enter the value of a = 2
Enter the value of b =3
sum = 5

Practical no 3

  • 1.
    Practical No.-3 Aim : Todemonstrate the program for adding two number. Source code : #include<iostream.h> #include<conio.h> void main() { int a, b,sum; cout <<”Enter the value of a ”; cin>>a; cout<<”Enter the value of b”; cin>>b; sum=a+b; cout<<”sum”<<sum; } Output : Enter the value of a = 2 Enter the value of b =3 sum = 5