Tuesday 10 March 2020

CPP program to implement increment of x and store it in y variable

Source Code:
#include<iostream>
using namespace std;
int main()
{
int x,y;
cout<<"Enter X = ";
cin>>x;
y=x++;
cout<<"Y is = "<<y<<endl;
cout<<"X is = "<<x<<endl;
return 0;
}


Program Output:

No comments:

Post a Comment