Hello, i am trying to solve that problem, it was already due for my class, an i am disappointed that i wasn't able to solve it
can any body give a descent solution for that


Q: The tiny tots tee-ball league has 12 players who have jersey numbers 0 through 11. The coach wants a program into which he can type a player’s number and the number of bases the player got in a turn at bat (a number 0 through 4). Write a program that allows the coach to continually enter the values until 999 is entered. Store the statistics in a two dimensional array. At the end of a data entry session, display each player’s number and the number of 0-bases, 1-base, 2-base, and 3-base, and 4-base turns the player had. Display a separate count of the number of data-entry errors the coach makes (a player number greater than 11 or a number of bases greater than 4).

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 TeeBall
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }


        int[,] teeBall = new int[13, 5];
        private void button1_Click(object sender, EventArgs e)
        {

            string userInput, userInput2;
            
            int score, totals;
            int player;
            
            userInput = textBox1.Text;
            player = Convert.ToInt32(userInput);
            userInput2 = textBox2.Text;
            score = Convert.ToInt32(userInput2);
            clickCunt.clicks += 1;
            if (player != 999)
            {
                teeBall[player, score] += 1;
                label4.Text = teeBall[0, 1].ToString();
            }
            else
            {
                label4.Text = "nothing";
                //textBox1.Text = "";
                //textBox2.Text = "";
            }
        }

        private void button2_Click(object sender, EventArgs e)
        {
            label4.Text =  "Player   0 Bases    1 Base    2 Bases     3 Bases  Home Runs";
            for (int x = 1; x < 13; x++)
            {
                label4.Text += String.Format("\n{0,10}", x);
                for (int s = 0; s < 5; s++)
                {
                    for (s = 0; s < 5; s++)
                    {
                       
                    }

                }
            }


        }

    }
}
class clickCunt
{
    public static int clicks = 0;
}

Recommended Answers

All 2 Replies

Hi Sheila, I have not the faintest idea what a tiny tots tee-ball league is so I'm affraid I cannot help you.:(

Please can you explain the problem you are facing? It will help us to find a solution

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.