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
agasfer [191]
2 years ago
15

A numeric test score is to be converted to a letter grade of A, B, or C according to the following rules: A score greater than 9

0 is considered an A; a score between 80 and 90, inclusive, is considered a B; and any other score is considered a C. What code segments will assign the correct letter grade to grade based on the value of the variable score?
Computers and Technology
1 answer:
arlik [135]2 years ago
7 0

The code segment makes use of conditional statements.

Conditional statements in programming are used to make decisions

The code segment in C++ is as follows

if (score > 90) {

grade = 'A';

}

else if (score >= 80 && score < =90) {

grade = 'B';

}

else {

grade = 'C';

}

The above code segments take the score, make comparison, and then determine the appropriate letter grade.

Read more about code segments at:

brainly.com/question/20475581

You might be interested in
. Briefly describe an SQL DML statement for changing existing data in a table.
bearhunter [10]

Answer:

The Update statement in the DML is used for changing existing data in a table.

Explanation:

Their are following Sql statement in the DML.

Insert

This SQL statement is used for inserting data into the table.

select

This SQL statement is used for retrieving data from database  

update

This SQL statement is used for updating data in a table.

delete

This SQL statement is used for delete data from database .

The "UPDATE" SQL statement in DML is used for Modify the data in the existing table .

Following are the syntax of Update SQL query

Update tablename

set column1=value1,column2=value2............column N=valueN

Where condition;

Example :Suppose we have student table and (rollno,name,age and add) are the field for that table we have to change the address of rollno 105

Then we use update query like that

UPDATE STUDENT

SET add='kalam nagar'

where rollno=105;

8 0
3 years ago
Assume that an int variable counter has already been declared. Assume further a variable counterPointer of type "pointer to int"
Triss [41]

Answer:

Following are the statement:

counterPointer = &counter;

Explanation:

The following statement is correct because in the question it is given that there is an integer data type variable i.e., "counter" and there is another integer data type pointer variable i.e., "counterPointer" and finally we write a statement in which the pointer variable points to the integer variable.

5 0
3 years ago
How can the connection to salesforce be restricted only to the employee portal server? Universal containers (UC) uses a legacy E
Ad libitum [116K]

Answer

To restrict the connection only to the employee portal server, the IP address of the application should be added into the list of Trusted IP's.

Explanation:

Trusted IP's are the IP's that are used to identify the users that can be verified easily. Those users whose IP's are not listed in the trusted IP list needs to verify their identity by sending them login code on each transaction.

<em>In above mentioned case, We need to enlist the IP address of employee portal list in trusted IP list to ensure the restriction of login to employee only.</em>

4 0
3 years ago
add is a method that accepts two int arguments and returns their sum. Two int variables, euroSales and asiaSales, have already b
Oduvanchick [21]

Answer:

// here is code in Java.

// package

import java.util.*;

// class definition

class Main

{

   // method that return sum of two sale value

   public static int Add(int euroSales,int asiaSales)

   {

       // return the sum

       return euroSales+asiaSales;

   }

   //main method of the class

public static void main (String[] args) throws java.lang.Exception

{

   try{

    // variables

       int euroSales=100;

       int asiaSales=150;

       int eurasiaSales;

        // call the function

       eurasiaSales=Add(euroSales,asiaSales);

        // print the sum

       System.out.println("total sale is:"+eurasiaSales);

   }catch(Exception ex){

       return;}

}

}

Explanation:

Declare and initialize two variables "euroSales=100" and "asiaSales=150". Declare another variable eurasiaSales. Call the method Add() with euroSales and asiaSales as parameter. This method will add both the value and return the sum.This sum will be assigned to variable eurasiaSales.Then print the sum.

Output:

total sale is:250  

8 0
3 years ago
Write a method named showChar. The method should accept two arguments: a reference to a String object and an integer. The intege
matrenka [14]

A complete program with the method ShowCar:

import java.util.Scanner; // header file

public class ShowChar

{

public static void main(String[] args)

{

String lnOfText;

int i;

Scanner input = new Scanner(System.in);

System.out.print("Enter a line of text:");

lnOfText = input.nextLine();

System.out.print(" Enter your index: ");

i = input.nextInt();

show_Char(lnOfText,i);

}

public static void show_Char(String str_a, int i)

{

System.out.print(str_a.charAt(i));

}

}

In this program, both the inputs ie. a sentence or line of text as well as the index position is obtained. A method is written to find the string at that particular position. Finally the method prints that character at the particular index.

5 0
3 years ago
Other questions:
  • Is anyone familiar in drawing flow charts for c++ programming
    14·1 answer
  • 1. Mobile devices have a _________ viewport that displays a web page content that fits within a mobile screen.
    11·1 answer
  • What is the term for a device that converts digital data from a computer into analog signals and back again?
    9·1 answer
  • Programmers insert documentation called facts into the program code.? <br> a. True <br> b. False
    9·1 answer
  • Introduction to computing systems: from bits and gates to c and beyond
    7·1 answer
  • fun fact about London(me): when it comes to relationships she becomes clingy to the person shes dating
    10·1 answer
  • Which is a connectionless protocol in the transport layer? What are the small chunks of data called?
    12·2 answers
  • OSI layer for HDLC??​
    13·1 answer
  • Why does this happen
    5·1 answer
  • The most common technique for using an appropriate synchronization mechanism to serialize the accesses to prevent errors is to a
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!