Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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 WindowsFormsApplication6
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void button1_Click(object sender, EventArgs e)
- {
- int radius = Convert.ToInt32(textBox1.Text);
- int circumference = 2 * Math.PI * radius;
- int area = Math.PI * Math.Pow(radius, 2);
- int volume = (4 * Math.PI / 3) * Math.Pow(radius, 3);
- Graphics paper;
- paper = pictureBox1.CreateGraphics();
- Pen pen = new Pen(Color.Red);
- paper.DrawEllipse(pen, 0, circumference, area, volume);
- }
- }
- }
- int straal = Convert.ToInt32(textBox1.Text);
- double omtrek = 2 * Math.PI * straal;
- double oppervlakte = Math.PI * Math.Pow(straal, 2);
- double volume = (4 * Math.PI / 3) * Math.Pow(straal, 3);
- Graphics paper;
- paper = pictureBox1.CreateGraphics();
- Pen pen = new Pen(Color.Red);
- paper.DrawEllipse(pen, 0, Convert.ToInt32(omtrek), Convert.ToInt32(oppervlakte), Convert.ToInt32(volume));
- double myDouble = 3.211;
- int myInt = (int)myDouble;
- int circumference = (int)(2 * Math.PI * radius);
- int area = (int)(Math.PI * Math.Pow(radius, 2));
- int volume = (int)((4 * Math.PI / 3) * Math.Pow(radius, 3));
Add Comment
Please, Sign In to add comment