Question
Pls help me in C programming * I just need answer questions 5 ,6 and 7 pls thinks for your helping the answer for 1
Pls help me in C programming
* I just need answer questions 5 ,6 and 7 pls
thinks for your helping
the answer for 1 to 4
Ans 1
// Used for input & Output #include
int main() { // Variable to store lab score & lab marks float lab_score, lab_mark; // Enter lab mark between 0 to 100 printf("Enter lab mark between 0 to 100: "); scanf("%f",&lab_mark); //Lab score is 15% of lab mark lab_score = lab_mark*15/100; printf("lab score is: %0.2f ",lab_score); //if lab score is more than 12.5 than congratulatory message will be displayed if (lab_score>=12.5) { printf(" Congratulations!!"); } //if lab score is less than 12.5 than encoragement message has to be displayed else { printf(" You can score more!!"); } return 0; }
Ans 2
// Used for input & Output #include
int main() { // Variable to store lab score & lab marks float lab_score, lab_mark; // Enter lab mark printf("Enter lab mark "); scanf("%f",&lab_mark); //To check whether lab marks are between 0 to 100 if(lab_mark>0 && lab_mark=12.5) { printf(" Congratulations!!"); } //if lab score is less than 12.5 than encoragement message has to be displayed else { printf(" You can score more!!"); } } //when lab mark are not between 0 to 100 else { printf("Invalid lab marks"); } return 0; }
Ans 3
// Used for input & Output #include
int main() { // Variable to store lab score & lab marks int i; float lab_score, lab_mark; //To take 3 student entry for(i=1;i0 && lab_mark=9) { printf(" Pass"); } //if lab score is less than 9 student fails in lab CSEB134 else { printf(" Fail"); } } //when lab mark are not between 0 to 100 else { printf(" Invalid lab marks"); } } return 0; }
Ans 4
// Used for input & Output #include
int main() { // Variable to store lab score & lab marks int i; float final_mark,mid_mark,final_score; //To take 3 student entry for(i=1;i0 && mid_mark0 && final_mark=40) { printf(" Pass"); } //if score is less than 40 student fails else { printf(" Fail"); } } } } return 0; }
QUESTIONS 1. Write a program to read lab mark from the keyboard with the assumption that only valid value between 0 to 100 is entered (there is no need to validate the input for now). Then, convert the lab mark to be over 15 percent. For example, if the lab mark is 90 then the converted lab score is 13.5%. If the lab score is more than 12.5, display congratulatory remarks on the screen. Otherwise display an encouragement remark. 2. Modify the program written for Question (1) to check the validity of the lab mark entered to be between 0 to 100 only. If invalid data is entered, display appropriate error message on the screen and indicate the end of the program. -53-Jan2021 1 SE32223 Programming / 913:44 Poging who 3. Modify the program written for Question (2). In this new program, read lab marks of three students of the CSEB134/CSNB144 course. Convert each lab mark to be over 15 percent. Then, evaluate the scores one by one to determine whether the students received either passing or falling grade of the lab. The passing scores are 9 and above. For each student, print the lab score and the "PASS" or "FAIL" status. 4. Modify the program written for Question (3). In this new program, read mid-term exam mark between 0 to 25 and final exam mark between 0 to 100 (to be converted to be over 60%). Then, calculate the total score of each student. The passing total scores are 40 and above. For each student, print the total score and the "PASS" or "FAIL" status by implementing the conditional operator in the program. 5. Modify the program written for Question (4). In the new program, indicate the number of students who have passed and failed the course. Show the passing rate of the course too. 6. Modify the program written for Question (5). In the new program, indicate the grade of the total score of each student based on the following: Percentage >= 90%: Grade A Percentage >= 80%: Grade B Percentage >= 70%: Gradec Percentage >= 60% : Grade D Percentage >= 40%: Grade E PercentageStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started