25.0k views
4 votes
How would you describe by adding comments to the coding explaining that you know what int num1 = 10; int ave = (num1+num2+num3)/3; means? Is it declaring that num1 = 10?

User JvO
by
6.3k points

1 Answer

4 votes

Answer:

//declaring variable num1 and intializing it to 10

int num1 = 10;

//declaring variable ave and assigning average of 3 numbers num1,num2,num3

int ave = (num1+num2+num3)/3;

Step-by-step explanation:

//declaring variable num1 and intializing it to 10

int num1 = 10;

//declaring variable ave and assigning average of 3 numbers num1,num2,num3

int ave = (num1+num2+num3)/3;

User Lahiru Prasanna
by
5.2k points