Sutures are strands or fibers used to sew living tissue together after an injury
ID: 646512 • Letter: S
Question
Sutures are strands or fibers used to sew living tissue together after an injury or an operation. Packages of sutures must be sealed carefully before they are shipped to hospitals to prevent contamination. The packages are sealed on a machine with a sealing die. For the sealing to be a success, the die must be maintained at an established temperature, and contact the package with a predetermined pressure for an established time period. This time period is called the dwell time.
Temperature: 150-170
Explanation / Answer
#include <iostream>
#include <fstream>
using namespace std;
int main(){
ifstream in;
ofstream out;
out.open("failedsutures.txt");
in.open("sutures.txt");
int batch, flag = 0;
double t, p, time;
int c = 0, fc = 0, tc = 0, pc = 0, tic = 0;
if(in.is_open()){
while(in >> batch){
++c;
flag = 0;
in >> t >> p >> time;
if(t < 150 || t > 170){
++tc;
flag = 1;
}
if(p < 60 || p > 70){
++pc;
flag = 1;
}
if(time < 2 || time > 2.5){
++tic;
flag = 1;
}
if(flag == 1){
++fc;
}
}
out << "Your Name" << endl;
out << "Total number of batches: " << c << endl;
out << "total number of batches rejected, for any one reason: " << fc << endl;
out << "percentage of batches rejected, due to temperature: " << tc * 100 / (double)c << endl;
out << "percentage of batches rejected, due to pressure: " << pc * 100 / (double)c << endl;
out << "percentage of batches rejected, due to time: " << tic * 100 / (double)c << endl;
cout << "Check failedsutures.txt for result" << endl;
in.close();
out.close();
}
return 0;
}
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.