p and qがandの両隣をandした結果が1だったら処理を実行 if p then if q thenがif pが成立しててなおかつif qが成立してたら処理を実行 ですかね?