Write a for statement to add all the numbers divisible by 3 or 5 between 1 and 1000. (4)
What is the output of the following code? Is there a relationship between the variables x and y? If yes, state the relationship? What is the output? (4)
int x = 19683;
int i;
int y = 0;
for (i = x; i >= 1; i = i / 3) y++;
cout
“x=” << x << ” ,=”” y=””>
>