<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:
data source
Explanation:
The main aim of a data source is for the gathering of all necessary information that is needed to access a data. Since he has used the information to create a pie chart, this means that some data were used for the creation of this pie chart. Hence the information used for the creation of the pie chart is the data source for the information illustrated on the pie chart.
Answer:
The answer to this question is given below in the explanation section.
Explanation:
This program is written in C++.
#include <iostream>
using namespace std;
int main()
{
string word;// variable for taking user input
int cond;// to set condition true if user preses the stop and exit from loop
cout<<"Enter word: \n";
cin>>word;
do// start while loop
{
if(word=="stop" || word =="STOP" || word == "Stop")// if user enter word stop, then program exit
{
cond=0;
}
else//otherwise loop continue
{
cout<<" You Entered "+ word +"\n";
cout<<"Enter word: \n";
cin>>word;
cond=1;
}
}
while(cond == 1);// if user don't enter word "stop" loop run continuesly.
cout<<"Program exit";
return 0;
}
Answer:
13.0
Explanation:
The method doubleVal() is created to accept a single parameter of type double.
It multiplies what ever the value of the parameter is and returns the resulting value.
In this question The method is called within this output statement System.out.println(doubleVal(val)); (Note that val had already been declared and assigned the value of 6.5)
The value 6.5 is doubled and outputed to the screen
<u><em>Differences between barcode reader and character recognition devices:</em></u>
Barcode Reader or Barcode Scanner:
- Barcode Scanner scans the data by brightening the barcodes usingSensor
- The analog signal is then converted into digital signal by Converter.
- The Decoder calculates the converted data and sends valid data to the computer.
Character Recognition Devices (OCR):
- OCR scans the physical document and converts them into two-coloured format.
- The darker and lighter area are identified as characters and blanks respectively.
- The common methods used are: Pattern Recognition and Feature Detection.