Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Susan is hired for a job, and her employer agrees to pay her every day. Her empl

ID: 643244 • Letter: S

Question

Susan is hired for a job, and her employer agrees to pay her every day. Her employer

also agrees that Susan’s salary is one penny the first day, two pennies the second day,
four pennies the third day, and continuing to double each day. Create an application
that allows the user to select or enter into a combo box the number of days that
Susan will work, and calculates the total amount of pay she will receive over that
period of time.

Program should use a loop to produce an output for each day of payment.

Visual Basic!

Explanation / Answer

using System;

using System.Windows.Forms;

namespace WindowsFormsApplication1

{

    public partial class Form1 : Form

    {

        public Form1()

        {

            InitializeComponent();

        }

        private void Form1_Load(object sender, EventArgs e)

        { for(int i=1;i<=1000;i++)

            comboBox1.Items.Add(i);

           

        }

    }

}