2
Answers

New C# programmer problem with currency output.

trevor kelly

trevor kelly

11y
2.1k
1
Hi Can someone tell me why I get ? sign instead of  the  € currency sign on my output from this code

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

 

namespace Currency

{

    class Program

    {

        static void Main(string[] args)

        {

          double euro,ans;

 

            Console.Write("What is 20.5 euro + 20 euro :");

            ans=Convert.ToDouble(Console.ReadLine());

 

            euro = ans;

 

            Console.WriteLine("\nThe ans is {0:C}", euro);

 

            // the output is what is 20.5 euro + 20 euro :

                   

                             //The ans is ? 40.5

Answers (2)