1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
julia-pushkina [17]
3 years ago
5

Consider this data sequence: "fish bird reptile reptile bird bird bird mammal fish". let's define a singleton to be a data eleme

nt that is not repeated immediately before or after itself in the sequence. so, here there are four singletons (the first appearance of "fish", the first appearance of "bird", "mammal", and the second appearance of "fish"). write some code that uses a loop to read a sequence of words, terminated by the "xxxxx". the code assigns to the variable n the number of singletons that were read. (for example in the above data sequence it would assign 4 to n. assume that n has already been declared . but not initialized . assume that there will be at least one word before the terminating "xxxxx".
Computers and Technology
1 answer:
Ierofanga [76]3 years ago
5 0
N = 0

string temp;
if wordset[0] != wordset[1] then {
    n = n + 1
}
temp = wordset[0]
for i = 1 to wordset.length - 2 do {
    if wordset[i] != temp AND wordset[i] != wordset[i + 1] then {
        n = n + 1
    }
    temp = wordset[i]
 
} 

}
You might be interested in
Give 3 reasons why it is believed that smart phones precent us from communicating face to face.give three reasons why it is beli
gregori [183]

Answer:

yes

Explanation:

because the people will be lazy to go and talk to that person instead They will call each other and discuss

7 0
2 years ago
Examine the following output:
zepelin [54]

Answer:

a. tracert

Explanation:

Tracert is a computer network diagnostic demand which displays possible routes for internet protocol network. It also measures transit delays of packets across network. The given output is produced by a tracert command.

8 0
3 years ago
A victimless crime is committed when
Ksju [112]
Someone downloads a pirated song or video a copyrighted image is used without permission and a person downloads and uses pirated software.
3 0
2 years ago
Word processing programs, spreadsheet programs, email programs, web browsers, and game programs belong to what category of softw
liq [111]

Answer:  They belong to a category of software known as Application program

Explanation: an application program is a computer program that is designed and implemented to carry out a specific task or for a specific purpose. Spreadsheet programs for instance are designed and implemented to carry out mathematical calculations, gaming programs for recreation, web programs for connecting to the internet and email programs for sending and receiving of emails.

6 0
3 years ago
Read 2 more answers
Que es taylorismo plis
valina [46]

It is a method of work organization that seeks to increase productivity through the maximum division of functions, the specialization of work and the strict control of the time needed for each task.

7 0
3 years ago
Other questions:
  • For local travel addresses and street names should be
    14·1 answer
  • All languages from the second generation on must be translated into machine language for the computer to be able process the inp
    8·1 answer
  • According to the text, the three IT trends that are having the greatest impact on the IT environment are:
    11·1 answer
  • Which of the following is best known as a business network LinkedIn, Facebook, Twitter or Word Press?
    15·1 answer
  • What type of code do computers typically use to operate? A. CSS B. HTML 5 C. HTML D. Binary
    12·2 answers
  • An alarm clock draws 0.5 A of current when connected to a 120 volt circuit. Calculate its resistance.
    10·1 answer
  • Generalized goals are more likely to be achieved than specific goals. True or False
    7·1 answer
  • What is one disadvantage people face without a checking account?
    12·1 answer
  • Firewalls are available as a special hardware device or as software. A firewall will block packets of information that are from
    7·1 answer
  • How many different four-letter combinations for a locker password can you make with the lowercase and uppercase forms of the fir
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!