Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void button4_Click(object sender, EventArgs e)
- {
- double [] pci=new double[5];
- string b = "";
- for(int i =0; i<pci.Length; i++)
- {
- double a = income[i] / fam[i];
- pci[i] = a;
- }
- for (int i = 0; i < pci.Length; i++)
- {
- for (int j = 0; j < pci.Length;j++ )
- if (pci[i]<pci[j])
- {
- double temp = pci[j];
- pci[i] = pci[j];
- pci[j] = temp;
- }
- }
- for (int i = 0; i < pci.Length; i++)
- {
- b += pci[i].ToString() + "\n";
- }
- MessageBox.Show(b);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement