answer.
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
masha68 [24]
2 years ago
9

If the input is negative, make numItemsPointer be null. Otherwise, make numItemsPointer point to numItems and multiply the value

to which numItemsPointer points by 10. Ex: If the user enters 99, the output should be:
Computers and Technology
1 answer:
Brilliant_brown [7]2 years ago
6 0

Answer:

The code for the given statements are described below.

Explanation:

// Place code below in line 9

if(numItems < 0)  // starting of a loop

{

numItemsPointer = NULL;

}

else  

{

numItemsPointer = &numItems;

numItems = numItems * 10;   // items multiplied by 10

}   // ending of a loop

You might be interested in
Using evidence to dispel myths or false beliefs is one way to move closer to evidence-based practice. Please select the best ans
Marrrta [24]
The correct answer is TRUE
7 0
2 years ago
Read 2 more answers
Prove that any amount of postage greater than or equal to 64 cents can be obtained using only 5-cent and 17-cent stamps?
elixir [45]
Let P(n) be "a postage of n cents can be formed using 5-cent and 17-cent stamps if n is greater than 63".Basis step: P(64) is true since 64 cents postage can be formed with one 5-cent and one 17-cent stamp.Inductive step: Assume that P(n) is true, that is, postage of n cents can be formed using 5-cent and 17-cent stamps. We will show how to form postage of n + 1 cents. By the inductive hypothesis postage of n cents can be formed using 5-cent and 17-cent stamps. If this included a 17-cent stamp, replace this 17-cent stamp with two 5-cent stamps to obtain n + 1 cents postage. Otherwise, only 5-cent stamps were used and n  65. Hence there are at least three 5-cent stamps forming n cents. Remove three of these 5-cent stamps and replace them with two 17-cent stamps to obtain n + 1 cents postage.Hence P(n + 1) is true.
6 0
2 years ago
Color of seagrass beds on navigational charts? Please quickly
Nadya [2.5K]
Hello! The color of seagrass beds on navigational charts are brown, because they are in shallow areas and it helps you know the locations of them.
5 0
2 years ago
Write a program that repeatedly reads in integers until a negative integer is read. The program keeps track of the largest integ
vfiekz [6]

Answer:

In Python:

num = int(input("Enter number: "))

maxn = num

while num >=0:

   if num>maxn:

       maxn = num

   num = int(input("Enter number: "))

print("Largest: "+str(maxn))

Explanation:

Get input from the user

num = int(input("Enter number: "))

Initialize the largest to the first input

maxn = num

This loop is repeated until a negative input is recorded

while num >=0:

If the current input is greater than the previous largest

   if num>maxn:

Set largest to the current input

       maxn = num

Get another input from the user

   num = int(input("Enter number: "))

Print the largest

print("Largest: "+str(maxn))

5 0
2 years ago
Declare a struct named PatientData that contains two integer data members named heightInches and weightPounds. Sample output for
boyakko [2]

Answer:

struct PatientData{

   int heightInches, weightPounds;

};

Explanation:

In order to declare the required struct in the question, you need to type the keyword <em>struct</em>, then the name of the struct - <em>PatientData</em>, <em>opening curly brace</em>, data members - <em>int heightInches, weightPounds;</em>, <em>closing curly brace</em> and <em>a semicolon</em> at the end.

Note that since the object - lunaLovegood, is declared in the main function, we do not need to declare it in the struct. However, if it was not declared in the main, then we would need to write <em>lunaLovegood</em> between the closing curly brace and the semicolon.

8 0
2 years ago
Other questions:
  • Which table style option is useful to display aggregated data when it is checked? total row filter button last column header row
    8·1 answer
  • A patient asks her doctor to send a copy of her records to another medical office. However, the records are not transmitted beca
    10·2 answers
  • Which description of the plain text file format is most accurate?
    11·2 answers
  • Write a program that prints the U.S. presidential election years from 1792 to present day, knowing that such elections occur eve
    9·1 answer
  • What three requirements are defined by the protocols used in network communications to allow message transmission across a netwo
    11·1 answer
  • Given an alphabet, print all the alphabets up to and including the given alphabet.
    15·2 answers
  • CodeHS Python Rainforest Exercise 5.4.7: Categories
    12·1 answer
  • Define a method named roleOf that takes the name of an actor as an argument and returns that actor's role. If the actor is not i
    8·1 answer
  • Write a function named file_stats that takes one string parameter (in_file) that is the name of an existing text file. The funct
    7·1 answer
  • Write a program that first gets a list of integers from input. The input begins with an integer indicating the number of integer
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!