程序顯示一個問題,用戶輸入1到5的數字。5個用戶的5個問題。然而,只要它是一個Int,程序就不會識別出好的輸入,或者不好的輸入。在它運行之前,我必須輸入很多次它再次運行Survey.presentQuestions()。我無法弄清楚爲什麼。 for (int i = 0; i < 5; i++)
{
for (int j = 0; j < 5; j++)
#include <stdio.h>
int main()
{
char name[10];
printf("Who are you? \n");
fgets(name,10,stdin);
printf("Good to meet you, %s.\n",name);
if(name=='spyros')
{
printf("Then you are here
當我運行以下代碼片段並輸入可接受的值時,我會得到所需的結果。 do while len(strselect) = 0 'or strselect<>"1" or strselect<>"2" or strselect<>"3"
strselect = inputbox ("Please select:" &vbcrlf&vbcrlf&_
"1. Add an entry" &vbcrlf&vb