Private Sub Command1_Click()
Dim wkday As String
Select Case Weekday(Text1)
Case 1
wkday = "星期日"
Case 2
wkday = "星期一"
Case 3
wkday = "星期二"
Case 4
wkday = "星期三"
Case 5
wkday = "星期四"
Case 6
wkday = "星期五"
Case 7
wkday = "星期六"
End Select
MsgBox Text1 &"是" &wkday
End Sub
//代码如下#include<stdio.h>
int main()
{
char *str[] = {"星期一", "星期二", "星期三", "星期四", "星期五", "星期六", "星期日"}
int n
printf("请输入数1-7: ")
scanf("%d", &n)
printf("%s\n", str[n-1])
return 0
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)