-moz-user-select:none; -webkit-user-select:none; -khtml-user-select:none; -ms-user-select:none; user-select:none;

Saturday 21 February 2015

Adding numbers by taking input from the user

Asalam o alikum
This blog will help you how to create a program by taking input from the user.

#include<iostream.h>
#include<conio.h>
void main( )
{
clrscr( );
int a,b,c;
cout<<"Enter the first number=";
cin>>a;
cout<<"Enter the second number=";
cin>>b;
c=a+b;
cout<<"Result="<<c;
getch( );
}

Output


No comments:

Post a Comment