please make this code work for many inputs not just two inputs then it terminates

#include <iostream> // requires for keyboard and screen I/O
#include <conio.h>  // for getch

using namespace std;

void main ()

{
	// local values
int frontPad;
int rearPad;
int door;
// output to screen
cout << "Welcome" << endl;
cout << "Enter either 0 or 1 for state of the\nFront Pad,\nRear Pad,\nand the Door" << endl;
cout << "separated by a blank" << endl;
// input 
cin >> frontPad >> rearPad >> door;

// if loop
if ((frontPad==1 && rearPad==1 && door==0) || (frontPad==0 && rearPad==0 && door==0) || (frontPad==0 && rearPad==1 && door==0) || (frontPad==0 && rearPad==0 && door==1))
{
		// output to screen
		cout << "Do not ativate the door\n" << endl;
		cout << "Enter 0 or 1 for the three sensors" << endl;
		// input
		cin >> frontPad >> rearPad >> door;

}	

else if ((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 << "Activate the door\n" << endl;
		cout << "Enter 0 or 1 for the three sensors" << endl;
		cin >> frontPad >> rearPad >> door;



}
	
	getch(); // holding the screen

} // end main

Just for clarification, are you asking us to fix the code and give it to you?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.