Professional Documents
Culture Documents
Experiment 13 Software Engineering Rishit Toteja 2k20 Ee 217
Experiment 13 Software Engineering Rishit Toteja 2k20 Ee 217
Experiment 13 Software Engineering Rishit Toteja 2k20 Ee 217
CO-301
EXPERIMENT - 13
RISHIT TOTEJA
(2K20/EE/217)
THEORY -
CODE -
#include <iostream>
using namespace std;
int main() {
float smh, tmh, choice, ava, per, qual, dp, rep, op, fal, pws, pwc;
cout << "1.Planned maintenance percentage\n2.Overall Equipment
Effectiveness\n3.Preventive maintenance compliance\nChoose choice:\n";
cin >> choice;
if (choice == 1) {
cout << "Enter scheduled maintenance hours\n";
cin >> smh;
cout << "Enter total maintenance hours\n";
cin >> tmh;
cout << "Planned maintenance percentage = " << smh * 100 /
tmh << "%\n"; }
else if (choice == 2) {
cout << "Enter availabality,performance and quality\n";
cin >> ava >> per >> qual;
cout << "Overall Equipment Effectiveness = " << ava * per *
qual << endl; }
else if (choice == 3) {
cout << "Enter preventive work scheduled\n";
cin >> pws;
cout << "Enter preventive work completed\n";
cin >> pwc;
cout << "Preventive maintenance compliance = " << pwc * 100 /
pws << "%\n"; }
else
cout << "Wrong choice\n";
return 0;
}
OUTPUT -
PRECAUTIONS -
1. Ensure that the code handles edge cases, such as invalid inputs, gracefully.
2. Properly format and comment your code for clarity and maintainability.
3. Validate the correctness of the program's logic for both triangle classification and
weekday calculation.