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
Zielflug [23.3K]
3 years ago
15

Write a C program to take a sequence of n integer values and remove duplicate occurrences, i.e. only the first occurrence of eac

h value will remain. n will be the first input value and the sequence may be read using scanf()s. The phases for performing this task are: a. Read input sequence of values, each value giving an ordered pair (value, position indicator). b. Sort the pairs in ascending order by value in a stable fashion. If your chosen sort is stable, then the key is just the value. If your chosen sort is unstable, the key must be extended with the position indicator. c. Using one pass (Θ(n) time) over the sorted result, remove any occurrences beyond the first one for a key. d. Sort the pairs using the (unique) position indicator as the key. e. Output the number of unique values followed by the values (without the position indicators). The input will be read from standard input (stdin) as either keyboard typing or as a shell redirect (<) from a file. Prompts/menus are completely unnecessary!
Computers and Technology
1 answer:
Hatshy [7]3 years ago
6 0
Explain in further detail what you need done
You might be interested in
Select the most likely outcome of making only on-time minimum payments to a credit
Serjik [45]
The answer is B. Your will have gone mostly towards paying interest and you will still owe the majority of the balance that you had from ago
4 0
4 years ago
Structured walk-throughs take place throughout the SDLC and are called _____ reviews, depending on the phase in which they occur
Tpy6a [65]

Answer:

design

Explanation:

Based on the information provided within the question it can be said that these are called design reviews. This is one of the most important parts of the development of a system. This focuses more on answering how something is going to be done in the system as opposed to answering what is going to be done for the system depending on the questions asked in the analysis phase.

5 0
3 years ago
Select the Navy Admiral who invented a high-level programming language FLOW-MATIC in 1953.
oee [108]

Answer:

Grace Hopper.

Explanation:

Grace Hopper was a US Naval Rear Admiral and an American computer scientist who was born on the 9th of December, 1906 in New York city, United States of America. She worked on the first commercial computer known as universal automatic computer (UNIVAC), after the second World War II.

In 1953 at the Remington Rand, Grace Hopper invented the first high-level programming language for UNIVAC 1 by using words and expressions.

Hence, Grace Hopper was the Navy Admiral who invented a high-level programming language FLOW-MATIC in 1953.

Additionally, FLOW-MATIC paved the way for the development of common business-oriented language (COBOL).

4 0
4 years ago
Write a Python function called validateCreditCard that takes 8-digit credit card number as the input parameter (string value) an
babunello [35]

Answer:

def validateCreditCard(x):

      if type(x)==str and len(x) == 8:

           print("Valid credit card number")

      else:

          print("Invalid credit card number")

validateCreditCard("43589795")

Explanation:

Run the code on your text editor(vs code, sublime, pycharm ) you will get your desired response. If your input is not of type string and not up to 8 digit you will get the response "invalid credit card number" but if it is of type string and up to 8 digit you will get "Valid credit card number".

But remember python works with indentation so when you are transferring this code to your text editor it will run properly well.

I defined the code using the conventional pattern "def"

After defining the function you create a brackets (x) to accommodate your argument x and end it with a semi colon.  

Then i use "if" statement to make sure only string argument and 8 digit value will be accepted to print a "valid credit card". if your argument does not pass the if statement condition it will print out the else statement condition which is "Invalid credit card number"

Finally, you have to call your function and test various values.

     

   

6 0
3 years ago
Which part of a computer is responsible for executing the software programs?
mamaluj [8]

Answer:

c. CPU

Explanation:

7 0
3 years ago
Other questions:
  • Describe the indicators and hazards of a metal deck roof fire in an unprotected steel joist warehouse as well as the techniques
    6·1 answer
  • If an ARQ algorithm is running over a 40-km point-to-point fiber optic link then:
    12·1 answer
  • Identify the six components of an information system. Which are most directly affected by the study of computer security? Which
    8·1 answer
  • When you receive a rejection message from an employer, you should?
    5·1 answer
  • It is important that data being imported from a text file into access are separated by a character, such as a comma, which defin
    8·1 answer
  • Presentation software is the best file type for writing a research paper. <br> True <br> False
    10·1 answer
  • Que es un programa de ordenador?
    10·1 answer
  • A network technician is attempting to add an older workstation to a Cisco switched LAN. The technician has manually configured t
    11·1 answer
  • Which of the following best explains what happens when a new device is connected to the Internet?
    9·1 answer
  • You have been asked to replace a cracked screen on a laptop. The replacement screen was delivered today, but it did not include
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!