| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 690 人关注过本帖
标题:求助?急!
取消只看楼主 加入收藏
yuxinwei
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2008-5-25
收藏
 问题点数:0 回复次数:0 
求助?急!
以下是中的程序,不知道错在什么地方?请高手支招啊!
Const PI As Double = 3.1415926
        Dim i As Integer = 0
        Dim dou1 As Double = Me.TextBox2.Text
        Dim r As Double = Double.Parse(dou1)
        Dim dou2 As Double = Me.TextBox3.Text
        Dim h As Double = Double.Parse(dou2)
        Dim s As Double = 0, v As Double = 0, s1 As Double = 0, s2 As Double = 0,
        i = Integer.Parse(Me.TextBox1.Text)
        Select Case i
            Case 1
                s1 = PI * r * r
                Me.Label8.Text = "圆柱的底面积为" + s1.ToString()
            Case 2
                s2 = 2 * PI * r * h
                Me.Label8.Text = "圆柱的侧面积为" + s2.ToString()
            Case 3
                s = PI * r * r + 2 * PI * r * h
                Me.Label8.Text = "圆柱的总面积为" + s.ToString()
            Case 4
                v = PI * r * r * h
                Me.Label8.Text = "圆柱的体积为" + v.ToString()


调试时说S  V  S1  S2未定义,不是很明白,请指教!
2008-05-25 16:26
快速回复:求助?急!
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.026785 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved