Answer:
Following is the program in C++ language :
#include <iostream> // header file
using namespace std; // namespace
int main() // main function
{
int j=10; // initialized j to 10
int k=2;// initialized k to 2
int i=4;// initialized i to 4
cout<<"old value of j:"<<j<<endl<<"old value of i:"<<i<<endl<<"old value of k:"<<k<<endl;
j=j*k;//Store the value of k times j in j.
i=k*i;//Store the value of k times i in i .
k=j+i;//add the value of j in i and store in k
cout<<"new value of j:"<<j<<endl<<"new value of i:"<<i<<endl<<"new value of k:"<<k;
return 0;
}
Output:
old value of j:10
old value of i:4
old value of k:2
new value of j:20
new value of i:8
new value of k:28
Explanation:
Following is the explanation of program: