199k views
2 votes
Given two integer variables matricAge and gradAge, write a statement that gives gradAge a value that is 4 more than the value of matricAge.

User TimVK
by
5.7k points

1 Answer

3 votes

Answer:

gradAge=matricAge+4;//Statement to give gradAge a value 4 more than matricAge.

Step-by-step explanation:

This statement assigns the value stored in the matricAge variable with 4 added to it.So the value assigned to the gradAge is 4 more than value of matricAge.We have used assignment operator(=) to do this.Assignment operator assigns the value/variable's value written in the right to the variable to the left.

User Victoriah
by
5.5k points