Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace WebAddess.cs
- {
- class Program
- {
- static void Main(string[] args)
- {
- string webadress = "";
- int lcv = 1;
- while (lcv < 5)
- {
- Console.Write("Enter a web address: ");
- webadress = Console.ReadLine();
- if(webadress.All(char.IsLetterOrDigit))
- {
- webadress = webadress.Replace(" ", "");
- Console.WriteLine("Web address is valid");
- break;
- }
- else
- {
- Console.WriteLine("Web address invalid.");
- }
- }
- Console.WriteLine("Your web address is: \n" +
- "www." + webadress + ".com");
- Console.ReadLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement