Answer to Question #33883 in C# for terror

Question #33883
Write a C# console application program that prompts the user for a name, Social Security number, hourly pay rate, and number of hours worked. Display all the input data as well as the following: (i) Gross Pay, defined as hourly pay rate times hours worked (ii) Pension fund, defined as 13.75% of the gross pay (iii) State withholding tax, defined as 17.23% of the gross pay Net pay, defined as gross pay minus taxes
1
Expert's answer
2013-08-13T09:25:39-0400
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Prints_the_average_value
{
class Program
{
//main function
static void Main(string[] args)
{

//average
double average = 0;
double sum = 0;//sum
Console.Write("Enter numbers: ");
for (int i = 0; i < 3; i++) {
sum += double.Parse(Console.ReadLine());//read number and add to sum
}
//calculate average
average = sum / 3;
//show result
Console.WriteLine("Average = " + average.ToString());
Console.ReadKey();//delay
}
}
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS