What is the output?

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=””>

>

WhatsApp
Hello! Need help with your assignments?

For faster services, inquiry about  new assignments submission or  follow ups on your assignments please text us/call us on +1 (251) 265-5102

🛡️ Worried About Plagiarism? Run a Free Turnitin Check Today!
Get peace of mind with a 100% AI-Free Report and expert editing assistance.

X