Answered step by step
Verified Expert Solution
Question
1 Approved Answer
using System; public static class Lab 4 _ 2 { public static void Main ( ) { const int PASS = 5 0 ; int
using System;
public static class Lab
public static void Main
const int PASS ;
int numPass numFail totalMarks;
double mark, perPass perFail;
loop to read in a valid mark or the sentinel value
do
Read initial mark seed the loop
Console.WriteEnter a mark between and ve value to stop: ;
mark Convert.ToDoubleConsoleReadLine;
while mark ;
if the inputted mark is not the sentinel value, process it
while mark
increment the counter for the total number of data values
Insert code
Determine if the mark is a pass or fail If statement
Insert code
Read next mark
Insert code
Calculate the percentage of marks that were passes and fails
Insert code
Print results
Console.WriteLineTotal number of marks totalMarks;
Console.WriteLinePercentage of passing marks :P perPass;
Console.WriteLinePercentage of failing marks :P perFail;
Console.ReadLine;
Step 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