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
motikmotik
3 years ago
12

Write the C program

Computers and Technology
1 answer:
VMariaS [17]3 years ago
5 0

Answer:

The program in C is as follows:

#include <stdio.h>

char turn_to_letter(double score){

   char lettergrade = 'A';

   if(score>=80){        lettergrade = 'A';    }

   else if(score>=70){        lettergrade = 'B';    }

   else if(score>=60){        lettergrade = 'C';    }

   else if(score>=50){        lettergrade = 'D';    }

   else{lettergrade = 'F';}

   return lettergrade;

}

int main(){

   int midterm, final;

   double score;

   printf("Midterm: ");    scanf("%d", &midterm);

   printf("Final: ");    scanf("%d", &final);  

   score = 0.4 * midterm + 0.6 * final;

   printf("Score: %lf\n", score);

   printf("Letter Grade: %c",turn_to_letter(score));

   return 0;

}

Explanation:

The function begins here

char turn_to_letter(double score){

This initializes lettergrade to A

   char lettergrade = 'A';

For scores above or equal to 80, grade is A

<em>    if(score>=80){        lettergrade = 'A';    }</em>

For scores above or equal to 70, grade is B

<em>    else if(score>=70){        lettergrade = 'B';    }</em>

For scores above or equal to 60, grade is C

<em>    else if(score>=60){        lettergrade = 'C';    }</em>

For scores above or equal to 50, grade is D

<em>    else if(score>=50){        lettergrade = 'D';    }</em>

Grade is F for other scores

<em>    else{lettergrade = 'F';}</em>

This returns the letter grade

   return lettergrade;

}

The main begins here

int main(){

This declares the midterm and final scores as integer

   int midterm, final;

This declares the total score as double

   double score;

These get input for midterm score

   printf("Midterm: ");    scanf("%d", &midterm);

These get input for final score

   printf("Final: ");    scanf("%d", &final);  

This calculates the total score

   score = 0.4 * midterm + 0.6 * final;

This prints the calculated total score

   printf("Score: %lf\n", score);

This calls the turn_to_letter function and prints the returned letter grade

   printf("Letter Grade: %c",turn_to_letter(score));

   return 0;

}

You might be interested in
CODING IN C++ URGENT HELP PLEASE
forsale [732]

Answer:

this is hard i thought i knew it wow u have hard stuff in your school

Explanation:

7 0
4 years ago
A computer connected to the internet that asks for data is a ________. aggregator surrogate server client
Tems11 [23]
The answer to this question would be client.

Client is the computer that most people use. When you browsing a web using the internet, your computer will ask for data from the web server and the data will be arranged into graphical picture or words what you see on your monitor. Server is the computer that gives data the client ask for.
3 0
3 years ago
Explanation capabilities can be added to a decision support system (DSS) by integrating it with a(n) _____. a. natural-language
deff fn [24]

Answer:

d. expert system

Explanation:

Among the types of systems that support the decision-making process, the following are identical:

Decision Support Systems (DSS: Decision Support Systems)

Support decision making by generating and systematically evaluating different alternatives or decision scenarios.

A DSS does not solve problems, since it only supports the decision-making process. The responsibility of making a decision, of adopting and making it is the responsibility of the administrators, not of the DSS. It can be used to obtain information that reveals the key elements of the problems and the relationships between them. It can also be used to identify, create and communicate available courses of action and decision alternatives.

Support Systems for Group Decision Making (Group Decision Support Systems). They cover the objective of achieving the participation of a group of people during decision-making in anonymous and consensus environments, supporting simultaneous decisions.

Expert Support Systems for Decision Making (DEss: Expert Decision Supprt Systems). They allow to load knowledge bases that are integrated by a series of common sense rules so that different users consult them, support decision making, training.

3 0
4 years ago
Read 2 more answers
Joshua Lee, an engineer at Footprints Inc., is provided with a design by the creative team in his company for creating a softwar
tamaranim1 [39]

Answer:

Development & implementation phase

Explanation:

There are mainly six stages of SDLC, which are as follows:

1. Planning: Planning is the first step in app development, where the developer preplans every aspect of the software.

2. Analysis: After planning, the developer analyzes further requirements to develop the software as per planning.

3. Design: After planning and analysis, the developer makes the design which is the main architecture of the software.

4. Development & implementation: When the developer completes the design, the development phase comes in where the data is coded and recorded as per requirement and after development, implementation takes place to see if software functions properly or not.

5. Testing: Testing mainly tests the programs to check for any errors or bugs.  

6. Maintenance: When the software is developed successfully, then time to time maintenance and updation of the software takes place to maintain and upgrade its working.

Hence according to the scenario, development & implementation phase is the right answer.

7 0
3 years ago
the header, in an academic report, typically contains the author’s name and the current page number true or false
kolbaska11 [484]
TRUE

True


In most academic reports, most specifically, an MLA academic report, Student’s last name and current page number is contained in the headers. In MLA, which is most common used formatting guide in academic reports, headers numbers all pages consecutively within the right margin.


6 0
3 years ago
Other questions:
  • A technician is troubleshooting a small network with cable Internet service in which a user is receiving a message in her web br
    15·1 answer
  • Which of the follow is the best technique to determine how many menu items are needed and how to structure the menus and sub men
    13·1 answer
  • The following method public String removeFromString(String old, String frag) removes all occurences of the string frag from the
    12·1 answer
  • Rachael has been posting negative comments on several of her peers' social media pages. Which of the six Ps is Rachael abusing?
    15·1 answer
  • A website's ____ page provides basic information about the individual or organization and includes a navigation bar with links t
    13·1 answer
  • 2min speech on can teachers be replace by technology​
    5·1 answer
  • Your company has purchased another company that also uses Windows Server 2016 and Active Directory. Both companies need to be ab
    11·1 answer
  • Hey, how is everyone????????????????????????????????
    8·2 answers
  • A__ is a part of a GUI that allows a specific type of interaction with the user.
    14·1 answer
  • The following statements regarding centralized administration concepts are presented to you in an interview in which only one of
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!