0

need help
1.
Which of the following options is a correct C++ instruction to calculate the number of containers filled with milk
that can be sold?
1. nrContainers = totalLitres - litresLeftOver;
2. nrContainers /= 5;
3. nrContainers = totalLitres / 5;
4. nrContainers = totalLitres % 5;
5. nrContainers = litresLeftOver * 5;


2.
Which of the following options is a correct C++ instruction to calculate the number of litres that will be left over?
1. litresLeftOver = totalLitres - nrContainers;
2. litresLeftOver /= 5;
3. litresLeftOver = totalLitres / 5;
4. litresLeftOver = totalLitres % 5;
5. litresLeftOver = nrContainers * 5;

2
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by neppy
0

These questions are actually not C++ questions, they are mainly logical, Infact, The C++ constraints come in only during the use of compound assignments operators, ie: ( +=, -= ,/= etc..)

So , Just think over the questions, And I GUESS you will get to the answer easily .

0

These questions are actually not C++ questions, they are mainly logical, Infact, The C++ constraints come in only during the use of compound assignments operators, ie: ( +=, -= ,/= etc..)

So , Just think over the questions, And I GUESS you will get to the answer easily .

Thanx Sky Diploma,

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.