(Find the number of days in a month) Write a program that prompts the user to enter the month and year and displays the number of days in the month. For example, If the user entered month 2 and year 2012, the program should display that February 2012 has 29 days. If the user entered month 3 and year 2015, the program should display that March 2015 has 31 days.

Answers

Answer 1
it would be a table program. you can add a table and put your data into the table

Related Questions

An introduction to object-oriented programming.
Write a GUI program named EggsInteractiveGUI that allows a user to input the number of eggs produced in a month by each of five chickens. Sum the eggs, then display the total in dozens and eggs. For example, a total of 127 eggs is 10 dozen and 7 eggs.

Answers

Answer:

The csharp program is given below.

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 WindowsFormsApplication1

{

   public partial class Form1 : Form

   {

       public Form1()

       {

           InitializeComponent();

      }

       private void button6_Click(object sender, EventArgs e)

       {

           int total = (Convert.ToInt32(textBox1.Text) +  Convert.ToInt32(textBox2.Text) + Convert.ToInt32(textBox3.Text) + Convert.ToInt32(textBox4.Text) + Convert.ToInt32(textBox5.Text));

           int dozen = total / 12;

           int eggs = total % 12;

           textBox6.Text = dozen.ToString();

           textBox7.Text = eggs.ToString();

       }

       private void button7_Click(object sender, EventArgs e)

       {

           textBox1.Text = "";

           textBox2.Text = "";

           textBox3.Text = "";

           textBox4.Text = "";

           textBox5.Text = "";

           textBox6.Text = "";

           textBox7.Text = "";

       }

        private void button8_Click(object sender, EventArgs e)

       {

           Close();

       }

    }

}

Explanation:

1. The integer variables are declared for total eggs, number of dozens and number of eggs.

2. The input of each text box is converted into integer by using the Convert.ToInt32() method on the value of that particular text box.

3. All the inputs are added and the sum is assigned to variable, total.

4. The number of dozens are obtained by dividing total by 12 and assigning the value to the variable, dozen.

5. The number of extra eggs are obtained by taking the modulus of total and 12 and the value is assigned to the variable, eggs.

6. The integer values in the variables, dozen and eggs, are converted into string using the ToString() function with that particular value.

dozen.ToString();

eggs.ToString();

7. The text boxes are assigned the respective values of dozens and number of eggs.

textBox6.Text = dozen.ToString();

textBox7.Text = eggs.ToString();

8. Two additional buttons, clear and exit, are also added.

9. The clear button erases the contents of all the text boxes. The Text property of each textbox is set to “” thereby clearing all the text fields.

10. The exit button closes the application using Close() function.

11. The program is made in visual studio and the output is attached.

Other Questions
A sample of carbon-12 has a mass of 6.00 g. How many atoms of carbon-12 are in the sample?3.01 x 10^236.02 x 10^231.20 x 10^243.60 x 10^24 Douglass chosen narrative point of view allows him to do what Use what you have learned about macroeconomics toexplain why the study of macroeconomics is important todaily life. What can people gain from understanding howeconomies work on the national or international level? Please answer need help PracticeentsonsEvaluationCalculate simple interestQuestionCarolyn makes a deposit of $2,800 into a savings account. The bank calculates simple interest annually at a rate of 7.5%.Interest is added every year on the anniversary of the initial deposit. How many years must Carolyn wait before herinvestment exceeds $3,500? Give your answer in years. Do not include units in your answer.Provide your answer below:FEEDBACKMORE INSTRUCTIONSUBMITContent attribution How did the settlers that came to Georgia feel about the Trustees rules? Tires are specifically designed with a grooved surface which is called a _____.Thread TreadScales Can you help me write an essay on #BlackLivesMatter based on the manifestations? Click to read the passage from The Metamorphosis, by Franz Kafka. Thenanswer the question.Gregor realizes that he does not like the milk his sister left for him. What doesthis detail suggest?O A. Gregor's sister wasted her time trying to help GrechtB. Gregor's transformation affected more than his appearance.OC. Gregor is not appreciative of his sister's kindness.O D. Gregor was not as hungry as he thought he was. Explain the challenges sole proprietors face when considering whether to expand their business. On March 31, 2018, Easy Rental Agency Inc.'s trial balance included the following selected unadjusted account balances. The company's year end is December 31 and it adjusts its accounts quarterly Debit Credit Prepaid insurance $14,740Supplies 2,900Equipment 22,100Accumulated depreciation-equipment 5,680Unearned revenue 9,730Loan payable, due 2020 20,000Rent revenue 30,900 Salaries expense 14,500 An analysis of the accounts shows the following: 1. The equipment, which was purchased on January 1, 2017, is estimated to have a useful life of four years. The company uses straight-line depreciation. 2. One third of the unearned revenue related to rent is still unearned at the end of the quarter.3. The loan payable has an interest rate of 6%. Interest is paid on the first day of each following month and was last paid March 1, 2018.4. Supplies on hand total $940 at March 31.5. The one-year insurance policy was purchased for $14,740 on January 1.6. Income tax is estimated to be $2,600 for the quarter.Prepare the quarterly adjusting entries required at March 31. An introduction to object-oriented programming. Write a GUI program named EggsInteractiveGUI that allows a user to input the number of eggs produced in a month by each of five chickens. Sum the eggs, then display the total in dozens and eggs. For example, a total of 127 eggs is 10 dozen and 7 eggs. differentiate between reverse osmosis and osmosis WHO DO YOU SAY " CAN WE BE FRIENDS" IN SPANISH? Simplify. 12x^4y^5+8x^3y^7-16x^2y^6 over 4xy^5 What is the value of x? Which statement best explains the central idea of thispassage?O The pigs use lies and deceit to control the otheranimalsO It is important for the pigs to be in good physicalhealth so they can be good leaders.O The farm cannot survive without the intelligence ofthe pigs.O The pigs always do things for the good of the otheranimals. A Carbon-10 nucleus has 6 protons and 4 neutrons. Through radioactive beta decay, it turns into a Boron-10 nucleus, with 5 protons and 5 neutrons, plus another particle. What kind of additional particle, if any, is produced during this decay 5x - 2 = 10 - XPlease help Whats the correct answer for this?