# include<iostream>
using namespace std;
void main()
{
int a;
cout<<"Enter a";
cin>>a;
a++;
cout<<a;
a--;
cout<<a;
}
here we will take any value from the user and that value is save in a...
then a will be incremented
Incremented mean to add one more to some variable like here a++ mean if a==1 then after incremented a will be 2...
after printing a on screen a will be decremented like a--;
Decremented mean to minus one to some variable like here a-- if a==2 ten after decremented a will be 1;
Your Suggestions will help us,so plz give suggestions in comment box
or feel free to share any problem
using namespace std;
void main()
{
int a;
cout<<"Enter a";
cin>>a;
a++;
cout<<a;
a--;
cout<<a;
}
here we will take any value from the user and that value is save in a...
then a will be incremented
Incremented mean to add one more to some variable like here a++ mean if a==1 then after incremented a will be 2...
after printing a on screen a will be decremented like a--;
Decremented mean to minus one to some variable like here a-- if a==2 ten after decremented a will be 1;
Your Suggestions will help us,so plz give suggestions in comment box
or feel free to share any problem
0 comments:
Post a Comment