using System.3.doc

(22 KB) Pobierz
using System;

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Text;

using System.Windows.Forms;

 

namespace WindowsApplication8

{

    public partial class Form1 : Form

    {

        public Graphics g;

        public Form1()

        {

            InitializeComponent();

 

        }

        public void wykresik(object sender, PaintEventArgs e)

        {

            Graphics g = this.CreateGraphics();

            Pen p = new Pen(Color.Blue, 2), p1 = new Pen(Color.Red, 1);

            g.DrawLine(p,new Point(0,300), new Point(300,300));

            int i=0;

            while (i<35){

                double x=-1+i*0.13;

                double y=Math.Pow (2,x)*Math.Pow(2*x+1,3)/(Math.Pow(x+3,2)*Math.Sqrt (3*x+4));

                int k=50+(int)(40*x), l=300-(int)(5*y);

                double x1=-1+(i+1)*0.13,y1=Math.Pow(2,x1)*Math.Pow (2*x1+1,3)/(Math.Pow (x1+3,2)*Math.Sqrt(3*x1+4));

                int s=50+(int)(40*x1), t=300-(int)(5*y1);

                g.DrawLine (p1,k,l,s,t);

                listBox1. Items.Add("x="+x+"y="+y+"x1="+x1+"y1="+y1);

                listBox1. Items.Add("k="+k+"l="+l+"s="+s+"t="+t);

                listBox1.Items.Add("");

                i++;

            }

        }

 

 

 

           

           

           

               

               

               

               

               

            

               

               

            }

           

           

        }

   

 

 

       

 

 

   

 

...
Zgłoś jeśli naruszono regulamin