tfsf.net
当前位置:首页>>关于求编一道VF编程题:输入一个数字(0-6),用中英文...的资料>>

求编一道VF编程题:输入一个数字(0-6),用中英文...

program mainimplicit none integer::number write(*,*)"请输入数字(0到6)" read(*,*)number if(number.eq.0)then write(*,"(a12)")"今天是星期天" write(*,"(a15)")"Today is Sunday" elseif(number.eq.1)then write(*,"(a12)")"今天

你的意思是指输入一个数字1,然后显示“星期一”,这样的吗?如果是.用select case来完成

新建VB工程,添加一个Text1和一个Command1,然后复制以下代码:Private Sub Command1_Click() Dim s As String On Error GoTo Line1 s = InputBox("请输入一个数字(范围[0-6]):", "输入框") If s = "" Then Exit Sub Text1.Text

private function getday(byval nday as integer) as string select case nday case 1 getday = "星期一 monday" case 2 getday = "星期二 tuesday" case 3 getday = "星期三 wednesday" case 4 getday = "星期四 thursday" case 5 getday = "星

clear accept "请输入一串字符:" to x store 0 to dyw,xyw,kg,sz,qt m=len(x) for i=1 to m x1=substr(x,i,1) k=asc(x1) do case case k=32 kg=kg+1 case k>=48 and k<=57 sz=sz+1 case k>=65 and k<=90 dyw=dyw+1 case k>=97 and k<=122 xyw=xyw+

clearinput "输入整数N:" to nn=abs(n) if n>0\x05sn=len(alltrim(str(n))) \x05?"此数是个"+alltrim(str(sn))+"位数.各位数是:"\x05nsum=0\x05for i=1 to len(str(n))\x05\x05nsum=nsum+val(substr(alltrim(str(n)

#include <stdio.h>#include <stdlib.h>#include <time.h> int main() { char str[20]; unsigned int i = 0; srand((unsigned int)(time(null))); while(i < 20) { str[i++] = (unsigned char)rand() % ('z' - 'a' + 1) + 'a'; } str[20] = '\0'; printf("原 串: %s\n",str); for(i =

private string Test(int i) { switch(i) { case 0: return "星期天"; case 1: return "星期一"; case 2: return "星期二"; case 3: return "星期三"; case 4: return "星期四"; case 5: return "星期五"; case 6: return "星期六"; default: return "输入错误"; }

兄弟,定义一个string数组,根据输入值的下标去取啊.string[] weeks=new string[6]{"星期天","星期一","星期二","星期三","星期四","星期五","星期六"}

&& 方案一:CLEARACCEPT "请输入字串:" TO ab=0c=0d=0e=0f=0n = LEN(a)FOR i = 1 TO n x=ASC(SUBSTR(a, i, 1)) DO CASE CASE (x >= 65 AND x == 97 AND x == 48 AND x = 评论0 0 0

相关文档
网站首页 | 网站地图
All rights reserved Powered by www.tfsf.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com