zoukankan      html  css  js  c++  java
  • 排球积分

    winform

    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;

    namespace YinTaiping
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
            }
            int a = 1;
            int b = 1;
            int i = 1;

            private void btnC_Click(object sender, EventArgs e)
            {
                int C = Convert.ToInt32(txt1.Text);
                int M = Convert.ToInt32(txt2.Text);
                int c1 = Convert.ToInt32(txt3.Text);
                int m1 = Convert.ToInt32(txt4.Text);
                txt1.Text = (a++).ToString();
                if (C >= 24 && (C - M) > 1)
                {
                    txt3.Text = (Convert.ToInt32(txt3.Text) + 1).ToString();
                    txt1.Text = "0";
                    txt2.Text = "0";
                    a = 1;
                    if (txt3.Text == "3")
                    {
                        MessageBox.Show("巴西队胜利!!");
                        txt1.Text = "0";
                        txt3.Text = "0";
                        txt2.Text = "0";
                        txt4.Text = "0";
                    }
                }
                if (c1 + m1 > 3)
                {
                    if (C >= 14 && (C - M) > 1)
                    {
                        txt3.Text = (Convert.ToInt32(txt3.Text) + 1).ToString();
                        txt1.Text = "0";
                        txt2.Text = "0";
                        a = 1;
                        if (txt3.Text == "3")
                        {
                            MessageBox.Show("巴西队胜利!!");
                            txt1.Text = "0";
                            txt3.Text = "0";
                            txt2.Text = "0";
                            txt4.Text = "0";
                            i = 1;
                        }
                    }
                }
            }

            private void btnM_Click(object sender, EventArgs e)
            {
                int H = Convert.ToInt32(txt1.Text);
                int L = Convert.ToInt32(txt2.Text);
                int H1 = Convert.ToInt32(txt3.Text);
                int L1 = Convert.ToInt32(txt4.Text);
                txt2.Text = (b++).ToString();
                if (L >= 24 && (L- H) > 1)
                {
                    txt4.Text = (Convert.ToInt32(txt4.Text) + 1).ToString();
                    txt1.Text = "0";
                    txt2.Text = "0";
                    b = 1;
                    if (txt4.Text == "3")
                    {
                        MessageBox.Show("中国队胜利!!");
                        txt1.Text = "0";
                        txt3.Text = "0";
                        txt2.Text = "0";
                        txt4.Text = "0";
                    }
                }
                if (H1 + L1 > 3)
                {
                    if (L >= 14 && (L-H) > 1)
                    {
                        txt4.Text = (Convert.ToInt32(txt4.Text) + 1).ToString();
                        txt1.Text = "0";
                        txt2.Text = "0";
                        b = 1;
                        if (txt4.Text == "3")
                        {
                            MessageBox.Show("中国队胜利!!");
                            txt1.Text = "0";
                            txt3.Text = "0";
                            txt2.Text = "0";
                            txt4.Text = "0";
                            i = 1;

                        }

                    }
                }
            }

        }
    }

  • 相关阅读:
    索引脚本实例1
    哈尔滨理工大学2016新生赛A题
    拒绝从入门到放弃_《Openstack 设计与实现》必读目录
    生成四位随机数,用于登录验证码制作。
    Python多线程学习(一、线程的使用)
    为什么在 React 16 版本中 render 阶段放弃了使用递归?
    “TensorFlow 开发者出道计划”全攻略,玩转社区看这里!
    【推荐】开源项目ElasticAmbari助力 ElasticSearch、Kibana、ambari服务高效运维管理
    nginx反向代理配置去除前缀
    LNMP架构部署(附:部署Discuz社区论坛Web应用)
  • 原文地址:https://www.cnblogs.com/yintaiping/p/6212846.html
Copyright © 2011-2022 走看看