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
Digiron [165]
3 years ago
8

Write a program to insert student grade and print the following

Computers and Technology
1 answer:
tangare [24]3 years ago
8 0

Answer:

The answer is the program, in the explanation

Explanation:

I am going to write a C program.

int main(){

int grade = -1; /*The grade will be read to this variable*/

/*This loop will keep repeating until a valid grade is inserted*/

while(grade < 0 || grade > 100){

         printf("Insert the student's grade: %n");

         scanf("%d", &grade);

}

/*The conditional according to the grade value*/

if (grade >= 90){

     printf("Your grade is A\n");

}

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

     printf("Your grade is B\n");

}

else if (grade >= 70 && grade < 80){

     printf("Your grade is C\n");

}

else if (grade >= 60 && grade < 70){

     printf("Your grade is D\n");

}

else{

    printf("You got a failling grade\n");

}

return 0;

}

You might be interested in
Enter a formula using a database function to calculate the total value in the Cost column for expenses that meet the criteria in
nadya68 [22]
17
Find y if the line through (5,3) and (-3, y) has a slope m = -
3 0
3 years ago
Write a program which populates an array with integer values read from a file. We do not know how many integers are in the file,
max2010maxim [7]

Answer:

#include <stdio.h>

#include <stdlib.h>

#include <string.h>

int main()

{

int arr[100];

int i = 0;

int j = 0;

char c[10];

char temp;

int sum = 0;

FILE* fp;

if ((fp = fopen("test.txt", "r")) == NULL) {

printf("cannot open the file");

return;

}

else {

do {

temp = fgetc(fp);

if (temp == ' ' || temp == '\n') {

c[j] = '\0';

arr[i++] = atoi(c);

j = 0;

continue;

}

c[j++] = temp;

} while (temp != EOF);

for (j = i - 1; j >= 0; j--) {

printf("%d\n", arr[j]);

}

}

getchar();

}

Explanation:

5 0
3 years ago
One way to prepare for filing the PROFILE is to:
kozerog [31]
I think I am not sure that it is probably b
8 0
3 years ago
Read 2 more answers
Differences between analog computer and hybrid computer​
aleksandrvk [35]

Answer:

Analog computers only work with continuous numerical data in analog quantities, digital computers can process both non-numerical and numerical data and a hybrid computer is a combination of both analog and digital. A hybrid computer has the accuracy of a digital computer paired with speed of an analog one.

5 0
3 years ago
Read 2 more answers
PLZ ANSWER ALL MY QUESTION. Which line of code will display the variable num rounded to the nearest tenth?
zavuch27 [327]

Answer:

A

Explanation:

5 0
3 years ago
Other questions:
  • Write a fragment of code that reads in strings from standard input, until end-of-file and prints to standard output the largest
    10·1 answer
  • What is unique about being an administrative professional in a government job?
    8·2 answers
  • Objects falling through air experience a type of friction called.. A.terminal velocity B.air resistance C.rolling friction
    8·1 answer
  • Three variables, x, y and z, supposedly hold strings of digits, suitable for converting to integers. Write code that converts th
    7·1 answer
  • What sends massive amounts of email to a specific person or system that can cause that user's server to stop functioning? mail b
    6·1 answer
  • What information is displayed in the title bar?
    10·1 answer
  • The intellectual property right that gives a creator control of his or her written work is known as what?
    9·1 answer
  • What techniques overcome resistance and improve the credibility of a product? Check all that apply.
    8·1 answer
  • Write if true or false
    12·1 answer
  • What is computer fundamental ?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!