Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace DataTypes
- {
- class Program
- {
- static void Main(string[] args)
- {
- string dataTypes = Console.ReadLine();
- string input = Console.ReadLine();
- Console.WriteLine(PrintTypeResult(dataTypes, input));
- }
- static string PrintTypeResult(string dt, string i)
- {
- return
- dt == "string" ? $"${i}$" :
- dt == "int"? $"{int.Parse(i) * 2}" :
- $"{double.Parse(i) * 1.5:f2}";
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement