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
leva [86]
2 years ago
9

Please help with this question

Computers and Technology
1 answer:
andrew-mc [135]2 years ago
3 0

The lines of code that write a statement that outputs variable userNum and ends with a newline is:

<h3>The code</h3>

#include <stdio.h>

int main(void) {

int userNum;

userNum = 15; // Program will be tested with values: 15, 40.

printf("%d\n", userNum);

return 0;

}

The above code writes a code in python (not Java) with the variable userNum and ends with a newline.

Read more about python programming here:

brainly.com/question/26497128

#SPJ1

You might be interested in
Draw a flowchart for an algorithm which calculates how much money a student will need per week to buy a meal and two drinks each
jasenka [17]

Flowcharts are used as a prototype of an actual program.

First, I will write out the algorithm; which will be used as an explanation of the flowchart (see attachment for flowchart)

The algorithm is as follows;

1. Start

2. Get input for cost of a meal and cost of a drink;

3. Calculate the total cost for a meal and two drinks

4. Multiply the total cost of a meal and two drinks by 7, to get the weekly cost

5. Display the weekly cost

6. Stop

At the end of the algorithm/flowchart, the weekly cost is calculated and printed.

See attachment for flowchart

Read more about algorithms and flowcharts at:

brainly.com/question/18088572

3 0
3 years ago
Supply is a powerful force in a free market.
Greeley [361]

Answer:

Input prices, number of sellers, technology, natural and social factors, and expectations.

Explanation:

Input in prices: When the prices go up supply will fall because lower quantities will be demanded.

Number of sellers: When the number of sellers are more, it will affect sales which is supply.

Technology: This helps in making supply to be properly done. Latest technology such as waybill, email, uber drivers, dispatch via logistics companies, shipment, air cargo carriers and a lot more.

5 0
4 years ago
Read 2 more answers
A Java main method uses the parameter (String[ ] variable) so that a user can run the program and supply "command-line" paramete
xxTIMURxx [149]

Answer:

True

Explanation:

Java and some other object oriented programs makes use of the command line arguments. This enables one to pass additional information to a program when it is run. whatever information that is passed to the program at the command line argument will accompany the program when is it run and java stores this information as an array of strings.

4 0
3 years ago
Write the following function without using the C++ string class or any functions in the standard library, including strlen(). Yo
dolphi86 [110]

Answer:

The function in C++ is as follows

int chkInd(string str1, string str2){    

int lenstr1=0;

while(str1[lenstr1] != '\0'){  lenstr1++;  }

int index = 0; int retIndex=0;

for(int i=lenstr1-1;i>=0; i--){

   while (str2[index] != '\0'){

       if (str1[i] == str2[index]){

           retIndex=1;

           break;         }

       else{   retIndex=0;      }

  index++;    }

  if (retIndex == 0){   return i;   }else{return -1;}}

}

Explanation:

This defines the function

int chkInd(string str1, string str2){    

First, the length of str1 is initialized to 0

int lenstr1=0;

The following loop then calculates the length of str1

while(str1[lenstr1] != '\0'){  lenstr1++;  }

This initializes the current index and the returned index to 0

int index = 0; int retIndex=0;

This iterates through str1

for(int i=lenstr1-1;i>=0; i--){

This loop is repeated while there are characters in str2

   while (str2[index] != '\0'){

If current element of str2 and str1 are the same

       if (str1[i] == str2[index]){

Set the returned index to 1

           retIndex=1;

Then exit the loop

           break;         }

If otherwise, set the returned index to 0

       else{   retIndex=0;      }

Increase index by 1

  index++;    }

This returns the calculated returned index; if no matching is found, it returns -1

  if (retIndex == 0){   return i;   }else{return -1;}}

}

4 0
3 years ago
In most signal "timing diagrams" (like the one below) the signals do not change from low to high, or from high to low, abruptly.
melisa1 [442]

Explanation:

This transient state occurs due to the fact that the signal change from low to high and high to low doesn't occur intermediately but in a very small time, in relation to the signal time itself.

At transistor level there are parasitic (undesired) capacitances and resistances, formed due to the layout configuration of conductor and dielectrics. As consequence a RC circuit is formed, thus making a propagation delay.

This delay must be characterized for each circuit, and specified as tpHL (transition time from High to Low) and tpLH (transition time from Low to High)

8 0
3 years ago
Other questions:
  • How do you know what memory to purchase for your computer?
    10·1 answer
  • How do particles move at higher temperatures compared to how they move at lower temperatures?
    10·1 answer
  • Which function is going to find the lowest value in a range of numbers? MIN MAXAVERAGE COUNT
    5·1 answer
  • (01.05 LC)
    7·2 answers
  • 1. Build and test D-type Flip-Flop using a built-in SR flip-flop.
    12·1 answer
  • Helppppp mee eeeee eee
    14·2 answers
  • You text file begins with the following rows. The pattern is a description of the item to be repaired, its color, and the issue.
    14·1 answer
  • Smart art is considered a​
    14·1 answer
  • Which of the following media forms is the Federal Communications Commission able to regulate content on?
    12·1 answer
  • Lucy wants to access the webpage. She is using her computer to access the webpage. What types of information will be in one fram
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!