<u>Answer:</u>
<em>int fNumber,scndNumber = -1, </em>
<em>dup = 0;
</em>
<em>do {
</em>
<em>cin >> fNumber;
</em>
<em>if ( scndNumber == -1) {
</em>
<em>scndNumber = fNumber;
</em>
<em>}
</em>
<em>else {
</em>
<em>if ( scndNumber == fNumber )
</em>
<em>duplicates++;
</em>
<em>else
</em>
<em>scndNumber = fNumber;
</em>
<em>}
</em>
<em>} while(fNumber > 0 ); </em>
<em>cout << dup;
</em>
<u>Explanation:</u>
Here three variables are declared to hold the first number which is used obtain all the inputs given by the user, second number to hold the value of <em>last encountered number and “dup” variable to count the number of duplicate values.</em>
<em>“Do-while”</em> loop help us to get the input check whether it is same as previous input if yes then it <em>adds to the duplicate</em> value otherwise the new previous value if stored.
Answer is given below
Explanation:
differences between a file-processing system and a database management system is given below
file-processing system
- File system is a software that manages and organizes the files in a storage medium within a computer.
- It doesn’t provide backup and recovery of data if it is lost.
- There is less data consistency in file system.
- File systems provide less security in comparison to DBMS.
- It is less complex as compared to DBMS.
database management system
- DBMS is a software for managing the database
- It provides backup and recovery of data even if it is lost.
- DBMS has more security mechanisms as compared to file system
- It has more complexity in handling as compared to file system.
- There is more data consistency because of the process of normalization.
Answer A. Hope it helped c:
Huh? I don’t understand your question... please be more specific so we can help you