Skip to content
Loading
How do I take to inputs in c# and out put them as outputs
  • Ramesh Palanivel
    Hi mal,
     
    please find some sample code changes of your code
    1. Console.Write("Taxation_Department ");  
    2.   
    3.            Console.Write("\n");  
    4.            // Declared variables     
    5.            int HourlyRate;  
    6.            double HoursWorked;  
    7.            double totalpay;  
    8.            double tax;  
    9.            double netpay;  
    10.            double taxrate;  
    11.            Console.Write("--------------------- ");  
    12.            Console.Write("\n");  
    13.            //Tangiable software converter C++ TO C# CONVERTER TODO TASK: The cout 'flush' manipulator is not converted by C++ to C# Converter: //ORIGINAL LINE: std::cout <<"Au to Us: $"<    
    14.            Console.Write("Please enter the Hours you worked");  
    15.            string buffer = Console.ReadLine();  
    16.            HoursWorked = Convert.ToDouble(buffer);  
    17.            Console.Write("Please enter the Hours Rate");  
    18.            HourlyRate = Int32.Parse(Console.ReadLine());  
    19.            totalpay = HourlyRate * HoursWorked;  
    20.            tax = 0.3 * totalpay;  
    21.            netpay = totalpay - tax;  
    22.            Console.Write("--------------------- ");  
    23.            Console.Write("\n");  
    24.            Console.Write("$1 Aud to Us is $");  
    25.            Console.Write(totalpay);  
    26.            Console.Write("\n");  
    27.            Console.WriteLine("--------------------- ");  
    28.            Console.WriteLine(tax);  
    29.            Console.Write("\n");  
    30.            Console.ReadKey();