Answer:
Following is the source code required:
int entry_1 ,entry_2 = -1, consecutive_duplicates = 0;
do {
cin >> entry_1;
if ( entry_2 == -1)
{
entry_2 = entry_1;
}else
{
if ( entry_2 == entry_1 )
consecutive_duplicates++;
else
entry_2 = entry_1;
}
}
while(entry_1 > 0 );
cout << consecutive_duplicates;
Explanation:
Following is the explanation for given code:
- 3 integers are declared as entry_1, entry_2 and consecutive_duplicates.
- entry_2 = -1 (it will tell that the integers are non-zero)
- user will enter the value for entry_1
- The loop will be applied which will check for the value of entry_2. If entry_2 = -1, the value of entry_1 will be stored in entry_2 else it the value of entry_2 is already equal to entry_1, the integer consecutive_duplicate in increased by one.
- Now the value of entry_1 is stored in entry_2 , so that next entity might be checked.
- In the end, while the entry_1 is greater than zero (unless the last (negative)element of array is reached), print the integer consecutive_duplicates.
i hope it will help you!
Answer:
if/else is probably the most simple structure to use. It takes a lot of manually entering strings and what not though. Not sure if this is what you're wondering.
Gamma rays are not used for communication.
-- We have no safe way to generate them.
-- We have no cheap way to detect them.
-- We have no way to impress information on them (modulate them).
-- They're dangerous.
Otherwise they're ideal for communication.
Answer:
Option 4 would be your best answer
Explanation:
The * means multiply
And the / means Divide
Hope this helps :D
Answer:
Animation can help make a PowerPoint presentation more dynamic, and help make information more memorable. ... Animation can be useful in making a presentation more dynamic, and help to emphasize points, but too much animation can be distracting. Do not let animation and sound take the focus away from what you are saying.
Explanation:
TWACB