Arduino Mega 2560 if statement flow options

Hi Guys,
Please help me understand the if flow instruction better. In my code I have 4 input sensor switches configured to PULLUP state so I can just connect a position switch to GND when TRUE.
The digital outputs switch 4 IGBT`s through driver boards to a small DC motor and in this case it runs on 50% duty cycle, simply for this example.
Is this the best way to handle the LOOP program?
Rgds
Cobus Verster.

#include <arduino.h>
#include <stdio.h>
const int Q1 = 2;// switch for mtr 1
const int Q2 = 3;// switch for mtr 2
const int Q3 = 4;// switch for mtr 3
const int Q4 = 5;// switch for mtr 4

const int posA = 47;// position sensor for mtr 1
const int posB = 49;// position sensor for mtr 2
const int posC = 51;// position sensor for mtr 3
const int posD = 53;// position sensor for mtr 4

void setup()
{
pinMode(Q1, OUTPUT);
pinMode(Q2, OUTPUT);
pinMode(Q3, OUTPUT);
pinMode(Q4, OUTPUT);

pinMode(posA, INPUT_PULLUP);//reverses the input logic.
pinMode(posB, INPUT_PULLUP);//reverses the input logic.
pinMode(posC, INPUT_PULLUP);//reverses the input logic.
pinMode(posD, INPUT_PULLUP);//reverses the input logic.

}

void loop()
{
int posAstate = digitalRead(posA);
int posBstate = digitalRead(posB);
int posCstate = digitalRead(posC);
int posDstate = digitalRead(posD);
if (posAstate == LOW)// position is true
{
digitalWrite(Q1, HIGH);//run small DC motor on 50% duty cycle.
delayMicroseconds(25);
digitalWrite(Q1, LOW);
delayMicroseconds(25);

}

if (posBstate == LOW)// position is true
{
digitalWrite(Q2, HIGH);//run small DC motor on 50% duty cycle.
delayMicroseconds(25);
digitalWrite(Q2, LOW);

}
if (posCstate == LOW)// position is true
{

digitalWrite(Q3, HIGH);//run small DC motor on 50% duty cycle.
delayMicroseconds(25);
digitalWrite(Q3, LOW);

}
if (posDstate == LOW)// position is true
{

digitalWrite(Q4, HIGH);//run small DC motor on 50% duty cycle.
delayMicroseconds(25);
digitalWrite(Q4, LOW);
delayMicroseconds(25);

}}

The control structure looks OK but the code does not do what the comments say. For instance

  if (posBstate == LOW)// position is true
  {
    digitalWrite(Q2, HIGH);//run small DC motor on 50% duty cycle.
    delayMicroseconds(25);
    digitalWrite(Q2, LOW);
  }

How long will the output stay LOW before going HIGH again if the input remains LOW ?
Why not use analogWrite() to control the motor speed ?

Note that you could reduce the amount of code considerably by using arrays and/or structs to hold the data and iterate through them using a for loop.

const int Q1 = 2;// switch for mtr 1
const int Q2 = 3;// switch for mtr 2
const int Q3 = 4;// switch for mtr 3
const int Q4 = 5;// switch for mtr 4

And yet, you set these as OUTPUT. The comment doesn't make sense in that context.

Variables holding pin numbers really should have Pin in the name, to make that clear.

const int posA = 47;// position sensor  for mtr 1
const int posB = 49;// position sensor  for mtr 2
const int posC = 51;// position sensor  for mtr 3
const int posD = 53;// position sensor  for mtr 4

What kind of position sensor? The use of these variables does not imply that thy hold any information related to the position of the motor.