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
Luba_88 [7]
3 years ago
11

Consider the following code:

Computers and Technology
1 answer:
Volgvan3 years ago
8 0

Answer:

The code will get stuck in an infinite loop.

Explanation:

Since val is decreasing by 1 each time it meets the criteria of being smaller than 10, your code will get stuck in an infinite loop since val will always be smaller than 10.

Hope this helps :)

You might be interested in
In older systems, often the user interface mainly consisted of ____-control screens that allowed a user to send commands to the
Scilla [17]

Answer:

Process

Explanation:

In older systems, the user interface mainly consisted of process-control screens that allowed a user to send commands to the system. These systems were used in a great variety of industries, and it gave the user control over process measurements or process variables. It also allowed the user to view the current state of the process, modify the operation of the process, and perform other related actions.

6 0
4 years ago
How to set a prperty to all intems in array c#
Katena32 [7]
Try looking at this site, <span>www.c-sharpcorner.com/article/working-with-arrays-in-C-Sharp/</span>
6 0
3 years ago
Which is an example,of an input devices? Choose the answer.
Alenkasestr [34]

Answer:

microphone

Explanation:

You have to plug in microphones, and if you plug it in, it is considered an input.

3 0
3 years ago
Write function modifyString(origString, charsToReplace, count) that takes as input a string origString, a string charsToReplace,
laila [671]

Answer:

The code of the above program is provided below. using Python

Explanation:

<u>Code in Python 3:- </u>

def modifyString(origString,charsToReplace,count):

# Make s1 as original string

s1=origString

# Make s2 as charsToReplace string in lowercase

s2=charsToReplace.lower()

# Make s3 as charsToReplace string in uppercase

s3=s2.upper()

# Initialize answer as an empty string

ans=''

# Iterate the string upto length times

for i in range(len(s1)):

# check for chars in the string and append to the answer

if (s1[i] in s2) or (s1[i] in s3):

ans=ans+count*s1[i]

else:

ans=ans+s1[i]

# return the final string

return ans

print(modifyString("Our cat is funny","aeiou",5))    

print(modifyString("Our cat is funny","zu",3))

8 0
3 years ago
Let's write a simple markdown parser function that will take in a single line of markdown and be translated into the appropriate
Klio2033 [76]

Answer:

Here is the answer in Java with appropriate comments for understanding

Explanation:

import java.util.Scanner;

public class Hash {

public static void main(String[] args) {

System.out.print("Enter a string : ");

Scanner scanner = new Scanner(System. in);

String s = scanner. nextLine();   //read string

int k=s.lastIndexOf('#'),count=0;//find last occurence of # then take the next part

  String s2="",s3="";

  for(int i=0;i<s.length();i++)

  {

      if(s.charAt(i)=='#')

          count++;//count the occurence of # of level of heading h1,h2,h3,....

  }

  for(int j=k+1;j<s.length();j++)

  {

      s2+=s.charAt(j);//take the remainging string after #

  }

// System.out.println(k);

 

//System.out.println(count);

if(count<=6)//if it is valid heading

{

  s3="<h"+count+">"+s2+"</h"+count+">";

  System.out.println(s3);  

}

else

  System.out.println("Invalid header");

 

}

}

6 0
3 years ago
Other questions:
  • Alison retrieved data from a company database containing personal information on customers. When she looks at the SSN field, she
    14·1 answer
  • Tomi is testing all of the links on her web page by clicking on each one in a browser. What type of testing is this considered?
    6·2 answers
  • In JAVA please:
    15·1 answer
  • count multiples(num1, num2, AND) Description: Returns the number of multiples of N that exist between num1 and num2 inclusive. P
    12·1 answer
  • Count positive and negative number and compute the average. The program will have the user input an unspecified number of intege
    6·1 answer
  • 3.2 lesson practice edhesive ​
    6·1 answer
  • Suppose that we are using PDDL to describe facts and actions in a certain world called JUNGLE. In the JUNGLE world there are 4 p
    7·1 answer
  • Your friend want to make a copy of your new game you bought the previous day .
    8·1 answer
  • Which visual aid would be best for showing changes inacts population size over time?
    15·1 answer
  • Different the policies and protocols in the industry
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!