Advertisement
Qrist

Town Info

Mar 30th, 2020
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.62 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Unknown
  4. {
  5.     class Program
  6.     {
  7.  
  8.         static void Main(string[] args)
  9.         {
  10.             Console.WriteLine("Please enter name of town");
  11.             string name = Console.ReadLine();
  12.             Console.WriteLine("Please enter the population");
  13.             int population = int.Parse(Console.ReadLine());
  14.             Console.WriteLine("Please enter the area");
  15.             int area = int.Parse(Console.ReadLine());
  16.             string information = $"Town {name} has population of {population} and area {area} square km";
  17.             Console.WriteLine(information);
  18.         }
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement