Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * name: Daryl Pinkerton
- * date: 05.6
- * teacher: mr.wach
- * assiment: Long Jump (Test p.2)
- * disription: crate a app that lets you avrage out the jumps from 4 jumps
- */
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace longJump
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void btnEnter_Click(object sender, EventArgs e)
- {
- //making all values a doble
- double first = Convert.ToDouble(txt1st.Text);
- double second = Convert.ToDouble(txt2nd.Text);
- double third = Convert.ToDouble(txt3rd.Text);
- double forth = Convert.ToDouble(txt4th.Text);
- //adding it all up
- double totle = (first + second + third + forth);
- //dividing
- double avrage = (totle/4);
- MessageBox.Show($"long jumps avraged is: {avrage}");
- }
- private void btnExit_Click(object sender, EventArgs e) => Application.Exit();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement