From 1001844a8338ab27c8394d4bc6ab3fe2eaf85520 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=A1=E5=9D=82=E6=98=B4?= Date: Thu, 24 Oct 2024 00:33:37 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AC=AC=E4=BA=8C=E9=A2=98=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E6=95=B0=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- homework3/test2.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/homework3/test2.cpp b/homework3/test2.cpp index dd10ac4..30f8274 100644 --- a/homework3/test2.cpp +++ b/homework3/test2.cpp @@ -7,7 +7,9 @@ using namespace std; int main() { SeqQueue q; initSeqQueue(q); - for (int i = 1; i <= 8; ++i) { + int input; + cin >> input; + for (int i = 1; i <= input; ++i) { enQueue(q, i); } int present = 1;