我有一個方法可以檢查用戶是否是學生,但我無法驗證條件。 char custStud = '0';
Scanner input = new Scanner(System.in);
do{
System.out.println("Are you a student? (Type Y or N): ");
custStud = input.next().charAt(0);
我正在尋找一個例子,直到/ while使用set語句,除了像下面的Dow循環。 data want;
set have;
do until/while (exit criteria);
* some SAS statements;
end;
run;
我原本試過這個。 data test;
input x;
cards;
我試圖讓做一個隨機數生成器生成的數字1到9之間的字符串,如果它產生的8,應該最後,然後顯示8停止生成。 到目前爲止它打印1 2 3 4 5 6 7 8,但它不會生成隨機數字串,所以我需要知道如何使循環實際上生成隨機數字,如上所述,感謝任何幫助! 的Javascript // 5. BONUS CHALLENGE: Write a while loop that builds a string of
我已經寫了一個讀命令函數。它將字符存儲到數組「前」(在一個新行開始)之前,並返回字符數,但似乎第一個單詞總是沒有被檢測到,並且有時在沒有識別單詞「去」的情況下它返回。誰能幫我。不勝感激! int read_command(char *input){
char inputarr[1000];
int count=0;
do
{
inputarr[