/* c++ is world popular language you can do every thing with the help of this
but after learning it
today lecture is on making calcultor but its mini hahahha
c++ have some Arthmetic operator like + ,- ,*, /, % today i will teach you how
to use these operator in c++*/
#include<iostream>
#include<conio.h>
using namespace std;
main()
{
int r; // declaring variable of data type int
r=2; // assigning values to that variable
int b; //declaring another varaible ;
b=4; // assigning value to that variable
int sum; // declaring another varaible to hold the sum of the two variables
sum=r+b; // here i am adding these two variables
cout<<sum; //here is output of sum variable
}
/* CONCEPT:
you are aware of assigning values to variable but here is another concept
on line 21 i declare int sum on line 23 the addition of both r and b are assign
to the sum and at the end sum is out put
so here a single variable is holding a combination of two variable
Practise:
write a program to perform the arithmetic operation by using all the operator
also print result of all these operation
*/
but after learning it
today lecture is on making calcultor but its mini hahahha
c++ have some Arthmetic operator like + ,- ,*, /, % today i will teach you how
to use these operator in c++*/
#include<iostream>
#include<conio.h>
using namespace std;
main()
{
int r; // declaring variable of data type int
r=2; // assigning values to that variable
int b; //declaring another varaible ;
b=4; // assigning value to that variable
int sum; // declaring another varaible to hold the sum of the two variables
sum=r+b; // here i am adding these two variables
cout<<sum; //here is output of sum variable
}
/* CONCEPT:
you are aware of assigning values to variable but here is another concept
on line 21 i declare int sum on line 23 the addition of both r and b are assign
to the sum and at the end sum is out put
so here a single variable is holding a combination of two variable
Practise:
write a program to perform the arithmetic operation by using all the operator
also print result of all these operation
*/
Comments
Post a Comment