星座测试api
VB制做星座测试的代码
我来回答:
在窗体添加 一个label,text1(月,如12),text2(日期,如12),三个按钮,OK~
你把代码复制进去就好了 ~~
Private Sub Command1_Click()'检测你是什么星座
a = Val(Text1.Text)
b = Val(Text2.Text)
C = a * 100 + b
Label1.Caption = "魔羯座"
If C > 1221 Then C = 0
If C > 119 Then
Label1.Caption = "水瓶座"
End If
If C > 218 Then
Label1.Caption = "双鱼座"
End If
If C > 320 Then
Label1.Caption = "白羊座"
End If
If C > 420 Then
Label1.Caption = "金牛座"
End If
If C > 520 Then
Label1.Caption = "双子座"
End If
If C > 621 Then
Label1.Caption = "巨蟹座"
End If
If C > 722 Then
Label1.Caption = "狮子座"
End If
If C > 822 Then
Label1.Caption = "处女座"
End If
If C > 922 Then
Label1.Caption = "天秤座"
End If
If C > 1022 Then
Label1.Caption = "天蝎座"
End If
If C > 1121 Then
Label1.Caption = "人马座"
End If
End Sub
Private Sub Command2_Click()'重置
Text1.Text = ""
Text2.Text = ""
Label1.Caption = ""
Text1.SetFocus
End Sub
Private Sub Command3_Click()'退出
End
End Sub
【API】拿到api数据接口该怎么写到自己的HTML里面!星座运势API!
java发一个http请求过去,带上参数就可以了啊,跟我们在浏览器上访问资源是一样的 只是它返回的是json格式的数据而已给你两个方法吧:
public static String do_post(String url, List<NameValuePair> name_value_pair) throws IOException { String body = "{}"; DefaultHttpClient httpclient = new DefaultHttpClient(); try { HttpPost httpost = new HttpPost(url); httpost.setEntity(new UrlEncodedFormEntity(name_value_pair, StandardCharsets.UTF_8)); HttpResponse response = httpclient.execute(httpost); HttpEntity entity = response.getEntity(); body = EntityUtils.toString(entity); } finally { httpclient.getConnectionManager().shutdown(); } return body; } public static String do_get(String url) throws ClientProtocolException, IOException { String body = "{}"; DefaultHttpClient httpclient = new DefaultHttpClient(); try { HttpGet httpget = new HttpGet(url); HttpResponse response = httpclient.execute(httpget); HttpEntity ent发处篡肺诂镀磋僧单吉ity = response.getEntity(); body = EntityUtils.toString(entity); } finally { httpclient.getConnectionManager().shutdown(); } return body; }
需求 星座测试之类的代码
rmb 10快,我给你写了
其实简单,只要你每次转换页面是
看看他前面的答案是什么
然后记录分数
最后在判断总数就ok
————
例子
if(问题1.答案==‘A’)
总分+1,return下一个问题
if(问题1.答案==‘B’)
总分+2,return下一个问题
if(问题1.答案==‘C’)
总分+3,return下一个问题
--
说有题目打完
if(总分=X)
rerun,你是a型号
else if(总分=y)
return 你是b型号
else
return 你是c型号
有没有星座运势的API接口
去星吧问问吧,有开放的星座运势api接口。
到底怎么样才能知道自己的确切的第二星座?我测试了百度的一点都不准!
你好 单从一个太阳星座看一个人的性格 是不准的 每个人都有自己的星盘 星盘上有太阳星座 月亮星座 水星星座 火星星座 金星星座 等等 然后星星与星星之间产生的相位的 直接影响了一个人的性格 你可以登录网易星盘查询到你的星盘 很详细的 希望能帮助到你
什么是第2星座,怎么查询
第一星座是按阳历先,第二星座按阴历算的。应该是这样吧!