I need to write a prgraom in C++ that meets this criteria. Program must be neat
ID: 669108 • Letter: I
Question
I need to write a prgraom in C++ that meets this criteria. Program must be neat and organized, thank you for the help!
Develop a C++ program that will simulate computer aided troubleshooting of a hypothetical diesel engine. The troubleshooting chart is shown below Check status lights Green Amber Red Do restart procedure Shut-off all input lines check meter #3 Check fuel line service routine =50 Check main line for test pressure Measure flow velocity at inlet 2-8 or Refer unit for factory service High low High or low Normal Normal Refer to motor service manual Refer to main line manual Refer to inlet service manualExplanation / Answer
#include<iostream.h>
void main()
{
char st_lg,p,v;
int mr;
cout<"Enter First Character for Status Light";
cin>>st_lg;
if(st_lg=='G')
{
cout<<"Do restart procedure";
}
if(st_lg=='A')
{
cout<<"Check fuel line service routine";
}
if(st_lg=='R')
{
cout<<"Shut off all input lines";
cout<<"Enter meter reading";
cin>>mr;
if(mr<50)
{
cout<<"Check main line for test pressure";
cout<<"Enter Pressure first character";
cin>>p;
if(p=='N')
{
cout<<"Refer to motor service manual";
}
else
{
cout<<"Refer to main line manual";
}
}
else if(mr>=50)
{
cout<<"Measure flow velocity at inlet 2-8";
cout<<"Enter Velocity first character";
cin>>v;
if(v=='N')
{
cout<<"Refer to inlet service manual";
}
else
{
cout<<"Refer unit for factory service";
}
}
}
}