Answer:
The program to this question as follows:
Program:
#include <iostream> //defining header file
using namespace std;
int main() //defining main method
{
int x = 10,y = 20,z = 30; //defining integer variable and assigning the value
int sum;//defining integer variable sum
sum =x+y+z;//adding value,that holds by sum variable
cout<<"sum: "<<sum; //print value
return 0;
}
Output:
sum: 60
Explanation:
Description of the above code as follows: