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
antoniya [11.8K]
3 years ago
6

Write a fragment of code that will test whether an integer variable score contains a valid test score. Valid test scores are in

the range 0 to 100.
Computers and Technology
1 answer:
Klio2033 [76]3 years ago
5 0

Answer:

Following are the code in the C Programming Language.

//set integer datatype variable

int score;

//check condition is the score is in the range of 0 to 100

if(score > 0 && score < 100){

//print if condition is true

printf("Valid test scores");

}else{

//otherwise print the following string.

printf("test scores are Invalid");

}

Explanation:

<u>Following are the description of the code.</u>

In the following code that is written in the C Programming Language.

  • Set an integer data type variable i.e., score.
  • Then, set the if conditional statement to check the condition is the variable "score" is greater than 0 and less the 100.
  • If the following statement is true then print "Valid test scores".
  • Otherwise, it print "test scores are Invalid".
You might be interested in
What is the primary uses of cell phone
den301095 [7]

Some primary uses of cell phones include, keeping in touch with friends or family. As well as communicating to work and to have in the event of an emergency.

8 0
3 years ago
Read 2 more answers
Think of an example in your life where a number could be described as data, information, and knowledge
zhannawk [14.2K]

Answer:

how many event you have been too in the last month (well non during this time but as an example)

Explanation:

4 0
3 years ago
Write a program that lets the user enter the name of a team and then displays the number of times that team has won the World Se
xz_007 [3.2K]

Answer:

see explaination

Explanation:

import java.io.*;

import java.util.Scanner;

public class Winners {

public static void main(String args[]) throws IOException {

Scanner sc = new Scanner(new File("WorldSeriesWinners.txt"));

String commands[] = new String[100000];

int c = 0;

while (sc.hasNextLine()) {

String input = sc.nextLine();

System.out.println(input);

if (input.isEmpty())

continue;

commands[c++] = input;

}

sc.close();

Scanner keyboard = new Scanner(System.in);

System.out.println("Enter the name of a team: ");

String name = keyboard.nextLine();

int count = 0;

for (int i = 0; i < c; i++) {

if (commands[i] != null) {

if (commands[i].equals(name)) {

++count;

}

}

}

if(count!=0)

System.out.println(name + " has won the World Series in the time period from 1903 through 2018 " +count + " number of times" );

else

System.out.println("Team with name "+name+ " does not exists");

}

}

5 0
3 years ago
HELP ME PLEASE
MAXImum [283]

Explanation:

Threats

Computer Security Threats are possible dangers that can affect the smooth functioning of your PC. These may be a small piece of adware or a harmful Trojan malware. In the present age, computer security threats are constantly increasing as the world is going digital. computer security threats

Types of Computer Security Threats

There are several types of computer security threats such as Trojans, Virus, Adware, Malware, Rootkit, hackers and much more. Check some of the most harmful types of computer Security Threats.

COMPUTER VIRUS

A Computer Virus is a malicious program, which replicates itself and infects the files and programs of your PC and can make them non-functional.

COMPUTER WORMS

A self-replicating computer program that spreads malicious codes, computer worms make use of the network to send copies of the original codes to other PCS. It can also go to the extent of sending transferring documents utilizing the email of the user.

SCAREWARE

Scareware is a malware that tricks victims to buy software by displaying fake virus alerts. A scareware infected PC may get pop-ups of fake malware threats and to get rid of those, users are prompted to purchase a fake anti-malware software.

KEYLOGGER

Also known as a keystroke logger, Keyloggers can track the real-time activity of a user on his computer. Keylogger runs in the background and records all keystrokes made by a user and passes the information to the hacker with the motive to steal password and banking details.

ROOTKIT

A rootkit is considered extremely dangerous as they appear to be legitimate files and deceives the computer user. Rootkit masks viruses and worms and makes them appear as necessary files. These are very difficult to remove and only an antivirus with the anti-rootkit feature can remove a rootkit.

Tips for Best Computer Security

For best computer security, you must follow certain guidelines, which are also called computer best practices. 1. Use the best antivirus software, which not only provides protection to your PC but also internet protection and guards against cyber threats. 2. Do not download untrusted email attachments and these may carry harmful malware. 3. Never download software from unreliable sites as they may come with a virus that may infect your system as soon as you install the software.

4 0
2 years ago
When the computer begins to run a program
Ne4ueva [31]

Answer:

1.the program is moved from secondary storage to memory.

Explanation:

Secondary storage media generally have greater storage capacity than RAM (random access memory), for this reason the data and program are stored there.

but ram memories are much faster, for example, a solid state disk (SSD) with SATA III connection can have read and write speeds of approximately 500 MB/s, while a DDR III RAM can have speeds between 12 and 18 GB/S, that is, more than 20 times faster.

 So that the flow of data at the time of running a program is optimal, the data from the secondary storage unit is copied to the RAM and this ensures that the speed at which the programs run is at least 20 times faster, and our processes run better.

7 0
3 years ago
Other questions:
  • The collodion process was significantly more expensive than the cost of a daguerreotype
    10·1 answer
  • What characteristics need to be exhibited by an organisation to improve its software process?
    7·1 answer
  • If you think a query is misspelled, which of the following should you do?
    15·1 answer
  • A(n) _____ might be written by a programmer or it might be created through a DBMS utility program.
    6·1 answer
  • You just received a message from the internet which was encrypted with asymmetric encryption. what do you need to do to read the
    12·1 answer
  • A process at Host C receiving two incoming UDP segments from two different hosts will know that they originated from two differe
    14·2 answers
  • We can improve our knowledge and skills on animals and fish raising with the use of internet​
    15·1 answer
  • What is an example of a recent development in technology
    11·2 answers
  • How do I delete my account on Brainly? It says I must enter my password to do so, but I never set up a password. When I try the
    8·1 answer
  • Which file type is the best choice if the image will be made into a billboard?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!