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 TP05Ex1_Demographie
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void btncalculer_Click(object sender, EventArgs e)
        {
            double i;
            int nban, anne;
            double popmond;
            int taux;
            anne = 2020;
            popmond = 7.5;
            nban = Convert.ToInt32(txtnban.Text);
            taux=Convert.ToInt32(txttaux.Text);
            for (i = 1; i <= nban; i = i + 1)
            {
                popmond =(popmond +popmond*taux/100);
                
                
                anne = anne + 1;
                
                lstpop.Items.Add(anne);
                lstpop.Items.Add(popmond);

            };
            
        }
        }
    }
