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 geometryBySku
- {
- class Program
- {
- static void Main(string[] args)
- {
- int skuCounter = 0;
- string sku = "";
- Dictionary<string, string> dict = new Dictionary<string, string>()
- {
- {"458329","SM_N09W065_WA-1_0"},
- {"102030","SM_N04M045_MA-2_0"},
- {"203040","SM_N05M90_MA-1_0"},
- {"304050","SM_N06W48_WA-2_0"},
- };
- while (skuCounter < 20000)
- {
- sku = Console.ReadLine();
- string endInput = sku;
- sku = sku.Remove(sku.Length - 4);
- if (endInput == "end!")
- {
- break;
- }
- else if(dict.ContainsKey(sku))
- {
- Console.WriteLine($"{dict[sku]}");
- }
- else
- {
- Console.WriteLine("n/a");
- }
- skuCounter += 1;
- }
- Console.WriteLine($"Total assigned skus: {skuCounter}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement