using C calculate the number of people per state the number
using C# calculate the number of people per state, the number of people per square mile in each state and lastly calculates how long each state has been a member of the US
Solution
using System;
using System.Collections.Generic;
using System.Text;
namespace ForgetCode
{
class Program
{
static void Main(string[] args)
{
int people, landarea;
int number_per_square_mile;
int year;
int number_years;
Console.WriteLine(\"Enter the number of people:\");
people = Convert.ToInt32(Console.ReadLine());
Console.WriteLine(\"Enter the land area\");
landarea = Convert.ToInt32(Console.ReadLine());
number_per_square_mile = people/landarea;
Console.WriteLine(\"Enter the year it was started:\");
number_years = (2016-year);
Console.WriteLine(\"The number pers square are=\" +number_per_square_mile);
Console.WriteLine(\"The number of years it has been a member =\" +number_years);
ConsoleReadLine();
}
}
}
