نمایش روز ماه سال
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication3
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void label3_Click(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
int a, y, m, w,d;
a = Convert.ToInt32(textBox1.Text);
y = (a / 365);
textBox2.Text = y.ToString();
y = (a % 365);
textBox3.Text =( y / 30).ToString();
y = y % 30;
textBox4.Text = (y / 7).ToString();
y = y % 7;
textBox5.Text = y.ToString();
}
private void Form1_Load(object sender, EventArgs e)
{
}
}
}
نظرات شما عزیزان: