Question

Write a program in C to find the student’s eligibility for admission into some academic program....

Write a program in C to find the student’s eligibility for admission into some academic program. Ask the user to enter three grades for Maths, Physics, and Chemistry. Then if: The student’s grade in Math is greater than 80 and in Physics is greater than 70, the student is eligible to study Engineering. The student’s grade in Physics is greater than 80 or Chemistry is greater than 90, the student is eligible to study Sciences. Otherwise, the student is not eligible to study in this college.

Homework Answers

Answer #1

Code:

#include<stdio.h>

int main()
{
   int maths,phy,chem;
   printf("\nEnter the Maths marks (out of 100):"); //input maths marks
   scanf("%d",&maths);
   printf("\nEnter the Physics marks (out of 100):"); //input physics marks
   scanf("%d",&phy);
   printf("\nEnter the Chemistry marks (out of 100):"); //input chemistry marks
   scanf("%d",&chem);
  
   printf("\nEntered marks:\n Maths:%d\tPhysics:%d\tChemistry:%d",maths,phy,chem);
  
   if((maths>80)&&(phy>70)) //checking condition 1
       printf("\nYou are eligible to study Engineering....");
      
   else if((phy>80)||(chem>90))
       printf("\nYou are eligible to study Sciences....");   //checking condition 2
      
   else                   //if both not satisfied
        printf("\nYou are not eligible to study in this college..!");
  
}

Output:

1)

2)

3)

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Write a program that requests some grades as inputs, and displays the average after dropping the...
Write a program that requests some grades as inputs, and displays the average after dropping the smallest and the largest grades! Your program should stop asking the user for a new grade when the user typed any negative number. Here is a sample run: Enter a grade?40 Enter a grade?50 Enter a grade?60 Enter a grade?70 Enter a grade?80 Enter a grade?90 Enter a grade?100 Enter a grade?-1 70.0 Note that in this example 40 is the lowest grade and...
5) Create a Java program using Scanner: Write a program where you will enter the grade...
5) Create a Java program using Scanner: Write a program where you will enter the grade score for 5 classes, then it will display total points and average and it will display the grade based on percentage. Steps: 1) Declare variable integer for English, Chemistry, Java Programming, Physics and Math 2) Declare variable total and percentage 3) Create Scanner object and prompt the user to enter grades for each class and input grades after each class 4) Calculate total of...
You are to write a program that will process students and their grades. For each student...
You are to write a program that will process students and their grades. For each student the program will read in a student’s name. It should also read in 10 test scores for the student and calculate his or her average. You must read the scores using a loop. The program should output the student’s name, average and letter grade. The average should be displayed accurate to 1 decimal digit. Letter grades are assigned based on the scale: 90-100    A...
C++ Write a program which accepts a numeric test score from the user. It will output...
C++ Write a program which accepts a numeric test score from the user. It will output the letter grade to the user corresponding to the score. Assume no “minus grades” (an A ranges from 90-100, B ranges from 80-89, C ranges from 70-79, D ranges from 60-69 and F is everything else.) Ensure that the score remains in the range of 0 to 100. As an example of the output: Enter your numeric grade and I will tell you your...
The following program allows the user to enter the grades of 10 students in a class...
The following program allows the user to enter the grades of 10 students in a class in an array called grade. In a separate loop, you need to test if a grade is passing or failing, and copy the grade to an array to store passing or failing grades accordingly. A passing grade is a grade greater than or equal to 60. You can assume the use will enter a grade in the range of 0 to 100, inclusive. ...
Java: A teacher has five students who have taken four tests. The teacher uses the following...
Java: A teacher has five students who have taken four tests. The teacher uses the following grading scale to assign a letter grade to a student, based on the average of his or her four test scores: Test Score Letter Grade 90–100 A 80–89 B 70–79 C 60–69 D 0–59 F Write a class that uses a String array (or an ArrayList object) to hold the five students’ names, an array of five characters to hold the five students’ letter...
IN PSUEDOCODE PSUEDOCODE PSUEDOCODE PSUEDOCODE Write a program to calculate 10 students’ average test scores and...
IN PSUEDOCODE PSUEDOCODE PSUEDOCODE PSUEDOCODE Write a program to calculate 10 students’ average test scores and the grade. (You will ask the user to input all students and their grades). You may assume the following input data: Jack Johnson 85 83 77 91 76 Lisa Aniston 80 90 95 93 48 Andy Cooper 78 81 11 90 73 Ravi Gupta 92 83 30 69 87 Bonny Blair 23 45 96 38 59 Danny Clark 60 85 45 39 67 Samantha...
In this lab, you will write a program that creates a binary search tree based on...
In this lab, you will write a program that creates a binary search tree based on user input. Then, the user will indicate what order to print the values in. **Please write in C code** Start with the bst.h and bst.c base code provided to you. You will need to modify the source and header file to complete this lab. bst.h: #ifndef BST_H #define BST_H typedef struct BSTNode { int value; struct BSTNode* left; struct BSTNode* right; } BSTNode; BSTNode*...
In The New York Times, there is a column called “The Ethicist,” where some writer for...
In The New York Times, there is a column called “The Ethicist,” where some writer for the newspaper gives arguments in response to questions that are posed by readers. In the question below titled “Test Prep or Perp?,” Randy Cohen is the writer who gives an argument in reply to someone’s question about whether it’s ethical to use Adderall (the person’s name is withheld) to help take the L.S.A.T. (Law School Admission Test). I think that there is at least...
Assignment: What are the main arguments in the article? Please answer within 5 hours. It is...
Assignment: What are the main arguments in the article? Please answer within 5 hours. It is extremely urgent!!!!!!!!!!!!!!!!!!!!!!!! --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- BIOETHICS. Bioethics as a field is relatively new, emerging only in the late 1960s, though many of the questions it addresses are as old as medicine itself. When Hippocrates wrote his now famous dictum Primum non nocere (First, do no harm), he was grappling with one of the core issues still facing human medicine, namely, the role and duty of the...