| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 540 人关注过本帖
标题:求助,大家帮帮,急用,不甚感激
只看楼主 加入收藏
sketty
Rank: 1
等 级:新手上路
帖 子:26
专家分:0
注 册:2006-4-27
收藏
 问题点数:0 回复次数:1 
求助,大家帮帮,急用,不甚感激
2:用已经学过的变量,数组,判断,循环,制作一个评分系统.系统功能描述如下:
很多场合都要用到评分系统,它的目的是从10个评委的亮分中,去掉一个最高分,去掉一个最低分,最后将分数相加,除以8得到选手最后得分
请作一个界面,上面10个文本框,输入10个数字当作10个评为亮分,点击按钮,显示最高分,最低分和选手最后得分
3:在很多比赛上,计分牌是很重要的软件.它的主要功能是
运动员入场,评委亮出他的分数,记分牌上面显示当前已经上场所有运动员的得分,并排序
但它不是普通的排序,格式如下:
9.123
-0.012
-0.024
...
将最高分数显示在第一个,以下显示的是其他选手少于这位最高分的分数,用负分打出
假如运动员共有8名,用vb.net做一个界面,界面上一个输入分数的文本框,一个"显示记分牌"
的按钮,当输入一个分数之后,点击这个按钮,能用以上格式在输出界面上显示记分牌,
4:做一个简单的计算器
界面上有1,2,3,4,5,6,7,8,9,0 十个数字按钮,+,-,*,/ 四个运算按钮,还有一个=按钮
点击按钮,文本框里面显示输入的值,按=号,得到结果
大家帮帮忙吧,今天下午就要用了,有哪个高手会的,帮忙一下吧,拜托各位了
搜索更多相关主题的帖子: 感激 
2006-04-28 11:49
regedit
Rank: 5Rank: 5
等 级:贵宾
威 望:19
帖 子:950
专家分:0
注 册:2004-6-8
收藏
得分:0 

写了你的第一个,用了arraylist,很方便的就计算出来了...

[CODE]Imports System.Collections
Public Class Form3
Inherits System.Windows.Forms.Form
#Region " Windows 窗体设计器生成的代码 "
Public Sub New()
MyBase.New()
'该调用是 Windows 窗体设计器所必需的。
InitializeComponent()
'在 InitializeComponent() 调用之后添加任何初始化
End Sub
'窗体重写 dispose 以清理组件列表。
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Windows 窗体设计器所必需的
Private components As System.ComponentModel.IContainer
'注意: 以下过程是 Windows 窗体设计器所必需的
'可以使用 Windows 窗体设计器修改此过程。
'不要使用代码编辑器修改它。
Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
Friend WithEvents TextBox2 As System.Windows.Forms.TextBox
Friend WithEvents TextBox3 As System.Windows.Forms.TextBox
Friend WithEvents TextBox4 As System.Windows.Forms.TextBox
Friend WithEvents TextBox5 As System.Windows.Forms.TextBox
Friend WithEvents TextBox6 As System.Windows.Forms.TextBox
Friend WithEvents TextBox7 As System.Windows.Forms.TextBox
Friend WithEvents TextBox8 As System.Windows.Forms.TextBox
Friend WithEvents TextBox9 As System.Windows.Forms.TextBox
Friend WithEvents TextBox10 As System.Windows.Forms.TextBox
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents lbldf As System.Windows.Forms.Label
Friend WithEvents rtb As System.Windows.Forms.RichTextBox
Friend WithEvents Label4 As System.Windows.Forms.Label
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.TextBox1 = New System.Windows.Forms.TextBox
Me.TextBox2 = New System.Windows.Forms.TextBox
Me.TextBox3 = New System.Windows.Forms.TextBox
Me.TextBox4 = New System.Windows.Forms.TextBox
Me.TextBox5 = New System.Windows.Forms.TextBox
Me.TextBox6 = New System.Windows.Forms.TextBox
Me.TextBox7 = New System.Windows.Forms.TextBox
Me.TextBox8 = New System.Windows.Forms.TextBox
Me.TextBox9 = New System.Windows.Forms.TextBox
Me.TextBox10 = New System.Windows.Forms.TextBox
Me.Label1 = New System.Windows.Forms.Label
Me.Button1 = New System.Windows.Forms.Button
Me.Label2 = New System.Windows.Forms.Label
Me.lbldf = New System.Windows.Forms.Label
Me.rtb = New System.Windows.Forms.RichTextBox
Me.Label4 = New System.Windows.Forms.Label
Me.SuspendLayout()
'
'TextBox1
'
Me.TextBox1.Location = New System.Drawing.Point(37, 48)
Me.TextBox1.Name = "TextBox1"
Me.TextBox1.Size = New System.Drawing.Size(24, 21)
Me.TextBox1.TabIndex = 0
Me.TextBox1.Text = "7"
Me.TextBox1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
'
'TextBox2
'
Me.TextBox2.Location = New System.Drawing.Point(73, 48)
Me.TextBox2.Name = "TextBox2"
Me.TextBox2.Size = New System.Drawing.Size(24, 21)
Me.TextBox2.TabIndex = 0
Me.TextBox2.Text = "1"
Me.TextBox2.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
'
'TextBox3
'
Me.TextBox3.Location = New System.Drawing.Point(109, 48)
Me.TextBox3.Name = "TextBox3"
Me.TextBox3.Size = New System.Drawing.Size(24, 21)
Me.TextBox3.TabIndex = 0
Me.TextBox3.Text = "4"
Me.TextBox3.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
'
'TextBox4
'
Me.TextBox4.Location = New System.Drawing.Point(145, 48)
Me.TextBox4.Name = "TextBox4"
Me.TextBox4.Size = New System.Drawing.Size(24, 21)
Me.TextBox4.TabIndex = 0
Me.TextBox4.Text = "4"
Me.TextBox4.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
'
'TextBox5
'
Me.TextBox5.Location = New System.Drawing.Point(181, 48)
Me.TextBox5.Name = "TextBox5"
Me.TextBox5.Size = New System.Drawing.Size(24, 21)
Me.TextBox5.TabIndex = 0
Me.TextBox5.Text = "10"
Me.TextBox5.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
'
'TextBox6
'
Me.TextBox6.Location = New System.Drawing.Point(217, 48)
Me.TextBox6.Name = "TextBox6"
Me.TextBox6.Size = New System.Drawing.Size(24, 21)
Me.TextBox6.TabIndex = 0
Me.TextBox6.Text = "3"
Me.TextBox6.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
'
'TextBox7
'
Me.TextBox7.Location = New System.Drawing.Point(253, 48)
Me.TextBox7.Name = "TextBox7"
Me.TextBox7.Size = New System.Drawing.Size(24, 21)
Me.TextBox7.TabIndex = 0
Me.TextBox7.Text = "9"
Me.TextBox7.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
'
'TextBox8
'
Me.TextBox8.Location = New System.Drawing.Point(289, 48)
Me.TextBox8.Name = "TextBox8"
Me.TextBox8.Size = New System.Drawing.Size(24, 21)
Me.TextBox8.TabIndex = 0
Me.TextBox8.Text = "10"
Me.TextBox8.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
'
'TextBox9
'
Me.TextBox9.Location = New System.Drawing.Point(325, 48)
Me.TextBox9.Name = "TextBox9"
Me.TextBox9.Size = New System.Drawing.Size(24, 21)
Me.TextBox9.TabIndex = 0
Me.TextBox9.Text = "6"
Me.TextBox9.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
'
'TextBox10
'
Me.TextBox10.Location = New System.Drawing.Point(361, 48)
Me.TextBox10.Name = "TextBox10"
Me.TextBox10.Size = New System.Drawing.Size(24, 21)
Me.TextBox10.TabIndex = 0
Me.TextBox10.Text = "2"
Me.TextBox10.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
'
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.Font = New System.Drawing.Font("宋体", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
Me.Label1.Location = New System.Drawing.Point(184, 24)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(29, 17)
Me.Label1.TabIndex = 1
Me.Label1.Text = "评分"
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(152, 88)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(136, 32)
Me.Button1.TabIndex = 2
Me.Button1.Text = "开始评分"
'
'Label2
'
Me.Label2.AutoSize = True
Me.Label2.Font = New System.Drawing.Font("宋体", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
Me.Label2.Location = New System.Drawing.Point(112, 139)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(60, 17)
Me.Label2.TabIndex = 3
Me.Label2.Text = "最终得分:"
'
'lbldf
'
Me.lbldf.AutoSize = True
Me.lbldf.Font = New System.Drawing.Font("宋体", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
Me.lbldf.ForeColor = System.Drawing.Color.Red
Me.lbldf.Location = New System.Drawing.Point(192, 136)
Me.lbldf.Name = "lbldf"
Me.lbldf.Size = New System.Drawing.Size(0, 22)
Me.lbldf.TabIndex = 4
Me.lbldf.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
'
'rtb
'
Me.rtb.Location = New System.Drawing.Point(24, 194)
Me.rtb.Name = "rtb"
Me.rtb.Size = New System.Drawing.Size(368, 118)
Me.rtb.TabIndex = 5
Me.rtb.Text = ""
'
'Label4
'
Me.Label4.AutoSize = True
Me.Label4.Font = New System.Drawing.Font("宋体", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
Me.Label4.Location = New System.Drawing.Point(168, 170)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(54, 17)
Me.Label4.TabIndex = 6
Me.Label4.Text = "评分过程"
'
'Form3
'
Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
Me.ClientSize = New System.Drawing.Size(424, 342)
Me.Controls.Add(Me.Label4)
Me.Controls.Add(Me.rtb)
Me.Controls.Add(Me.lbldf)
Me.Controls.Add(Me.Label2)
Me.Controls.Add(Me.Button1)
Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.TextBox1)
Me.Controls.Add(Me.TextBox2)
Me.Controls.Add(Me.TextBox3)
Me.Controls.Add(Me.TextBox4)
Me.Controls.Add(Me.TextBox5)
Me.Controls.Add(Me.TextBox6)
Me.Controls.Add(Me.TextBox7)
Me.Controls.Add(Me.TextBox8)
Me.Controls.Add(Me.TextBox9)
Me.Controls.Add(Me.TextBox10)
Me.Name = "Form3"
Me.Text = "Form3"
Me.ResumeLayout(False)
End Sub
#End Region
Public Fengshu As ArrayList
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Fengshu = New ArrayList
Dim i As Integer = 1
rtb.Text = "开始循环读取所有分数,并加入数组中" & Chr(13)
Fengshu.Add(CInt(TextBox1.Text()))
Fengshu.Add(CInt(TextBox2.Text()))
Fengshu.Add(CInt(TextBox3.Text()))
Fengshu.Add(CInt(TextBox4.Text()))
Fengshu.Add(CInt(TextBox5.Text()))
Fengshu.Add(CInt(TextBox6.Text()))
Fengshu.Add(CInt(TextBox7.Text()))
Fengshu.Add(CInt(TextBox8.Text()))
Fengshu.Add(CInt(TextBox9.Text()))
Fengshu.Add(CInt(TextBox10.Text()))
rtb.Text &= "成功插入" & Fengshu.Count & "个分数" & Chr(13)
rtb.Text &= "按大小进行排序..." & Chr(13)
Fengshu.Sort()
Dim fshu As Integer
rtb.Text &= "排序后的顺序为:" & Chr(13)
i = 1
For Each fshu In Fengshu
rtb.Text &= "第" & i & "个分数为:" & fshu.ToString & Chr(13)
i += 1
Next
rtb.Text &= "去掉最高分:" & Fengshu(0) & Chr(13)
rtb.Text &= "去掉最低分:" & Fengshu(9) & Chr(13)
Fengshu.RemoveAt(0)
Fengshu.RemoveAt(8)
rtb.Text &= "剩余的分数为:"
For Each fshu In Fengshu
rtb.Text &= fshu & ","
Next
rtb.Text &= Chr(13)
Dim zongfengshu As Integer
For Each fshu In Fengshu
zongfengshu += fshu
Next
rtb.Text &= "剩余8个分数的总和为:" & zongfengshu.ToString
rtb.Text &= "所以最后得分为:" & (zongfengshu / 8).ToString
lbldf.Text = (zongfengshu / 8)
End Sub
End Class[/CODE]


最新作品:百货品牌商品资讯第一门户([url]http://www./[/url]),欢迎交流
2006-04-28 22:39
快速回复:求助,大家帮帮,急用,不甚感激
数据加载中...
 
   



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

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