daily pastebin goal
57%
SHARE
TWEET

Untitled

a guest Feb 13th, 2018 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10.  
  11. namespace WindowsFormsApplication6
  12. {
  13.     public partial class Form1 : Form
  14.     {
  15.         public Form1()
  16.         {
  17.             InitializeComponent();
  18.         }
  19.  
  20.         private void button1_Click(object sender, EventArgs e)
  21.         {
  22.             int i = 0;
  23.  
  24.             if (Convert.ToInt32(textBox1.Text) < 0)
  25.                 i = i + 1;
  26.             if (Convert.ToInt32(textBox2.Text) < 0)
  27.                 i = i + 1;
  28.             if (Convert.ToInt32(textBox3.Text) < 0)
  29.                 i = i + 1;
  30.             if (Convert.ToInt32(textBox4.Text) < 0)
  31.                 i = i + 1;
  32.             if (Convert.ToInt32(textBox5.Text) < 0)
  33.                 i = i + 1;
  34.             if (Convert.ToInt32(textBox6.Text) < 0)
  35.                 i = i + 1;
  36.             if (Convert.ToInt32(textBox7.Text) < 0)
  37.                 i = i + 1;
  38.  
  39.             label8.Text = Convert.ToString(i);
  40.  
  41.            
  42.         }
  43.  
  44.         private void button2_Click(object sender, EventArgs e)
  45.         {
  46.             double suma = 0;
  47.  
  48.             suma = (Convert.ToDouble(textBox1.Text) + Convert.ToDouble(textBox2.Text) + Convert.ToDouble(textBox3.Text) + Convert.ToDouble(textBox4.Text) + Convert.ToDouble(textBox5.Text) + Convert.ToDouble(textBox6.Text) + Convert.ToDouble(textBox7.Text)) / 7;
  49.  
  50.             label9.Text = Convert.ToString(suma);
  51.         }
  52.     }
  53. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top