This is 6th video tutorial of C++ programming,the language of this tutorial is Urdu and Hindi. In this tutorial we will learn how user can put values in variables from keyboard and how we can create a basic calculator in c++ programming.
#include <iostream>
using namespace std;
int main()
{
int a;
int b;
int sum;
cout<<"Enter your first number";
cin>>a;
cout<<"Enter your second number";
cin>>b;
sum=a+b;
cout<<"The sum is "<<sum;
return 0;
}
#include <iostream>
using namespace std;
int main()
{
int a;
int b;
int sum;
cout<<"Enter your first number";
cin>>a;
cout<<"Enter your second number";
cin>>b;
sum=a+b;
cout<<"The sum is "<<sum;
return 0;
}
No comments:
Post a Comment