please check this code :
#include <iostream>// requires for keyboard and screen I/O
#include <conio.h>
using namespace std;
void main ()
{
int frontPad=0;
int rearPad=0;
int door=0;
cout << "Welcome" << endl;
cout << " Enter either 0 or 1 for state of the\n Front Pad,\n Rear Pad,\n and the Door" << endl;
cout << " separated by a blank" << endl;
cin >> frontPad;
cin >> rearPad;
cin >> door;
if ((frontPad ==0 && rearPad==0 && door==0) || (frontPad ==0 && rearPad ==0 && door==1) || (frontPad ==0 && rearPad ==1 && door==0) || (frontPad ==1 && rearPad ==1 && door==0))
{cout << "close" << endl;
cin >> frontPad;
cin >> rearPad;
cin >> door;
}
else (frontPad ==0 && rearPad ==1 && door==1) || (frontPad ==1 && rearPad ==0 && door==0) || (frontPad ==1 && rearPad ==0 && door==1) || (frontPad ==1 && rearPad ==1 && door==1);
{cout << "open" << endl;
cin >> frontPad;
cin >> rearPad;
cin >> door;
}
getch(); // holding the screen
} // end main