This is what i am doing:


Write a program that calculates and prints the take-home pay for a commissioned sales employee. Create appropriate variables and enter the values of variables that will change for each employee using Console.ReadLine(); Jessica received 7% of her total sales. Her federal tax rate is 18%. She contributes 10% to a retirement program and 6% to Social Security. Her sales this week were $28,000. Produce a formatted report showing the amount for each of the computed items. Select appropriate constants.

My professor just comes to the class and tells us this on our second day, after 1 lecture on basics, i am not sure at all how we go about doing this. I know if i have given this assignment on 2nd day, the class is going to be very hard and i need to get any extra credit that i can. any help would be appreciate.

8 Years
Discussion Span
Last Post by stephen84s

My professor just comes to the class and tells us this on our second day, after 1 lecture on basics,

Thats because only basics are needed to do this program all you need to know is how to read from the console, add,subtract,multiply and divide AND NO WE WILL NOT SPOON FEED YOU TO GET EXTRA CREDIT YOU DO NOT DESERVE, you show us that you are trying first and then will help you get there.

And last but not the least, this is not the correct forum, you should have posted this in the C# forum Care to read the rules first, If you care about getting answers to your questions.


yes, i dont want to get spoon feed, i did the first assignment, well with 4 friend but still he gave us lots of hits on the first project, which helped me complete, while on this one he said nothing. this is my first assignment.

/* Program Assignment 1
 * Saj amin
 * September 04, 2008*/

using System;
using System.Collections.Generic;
using System.Text;

namespace ProgramAssignment1
    class Program
        static void Main(string[] args)
            String sname;

            Console.WriteLine("Program Assignment 1");
            Console.Write("Type in your name: ");
            sname = Console.ReadLine();
            Console.WriteLine("Hello " + sname
            + "\n\t How are you today");

            const double dCENT_PER_INCH = 2.54;

            int iHeightIn;

            Console.WriteLine("Type your height in inches");
            iHeightIn = int.Parse(Console.ReadLine());

            double dHeightCent;

            dHeightCent = iHeightIn * dCENT_PER_INCH;

            Console.WriteLine("Your Height is " + dHeightCent.ToString("N1")
            + " centimeters");

            double dheightcentlifts;

            dheightcentlifts = (dHeightCent) + 8;

            Console.WriteLine("Your height wearing lifts is " + dheightcentlifts.ToString("N2")
            + " Centimeters");

            double nCels;

            Console.WriteLine("Type in the current Fahrenheit Tempature:");
            double nFarh = double.Parse(Console.ReadLine());
            nCels = (nFarh - 32) * (5.0 / 9.0);
            Console.Write("The Celsius Temperature is " + "{0:N2}", nCels);
            Console.Write(" Degrees Celsius.");


for the second one, i dont even know how to start, dont give me complete asnwer but just on to how to begin this? would be greatly appreciate


sorry, my IE got messed up and could not see any forums threads besides the old one.



I read that you will help us get started on the projects? as i said i dont want the full answer itself, i am a straight A student, and this is the first time i am in a computer programming class. I just need help start the project, do we have to declare anything at beginning? or just start with console.readline ();?


Its pretty simple. From your first chunk of code I see you know how to use Console.ReadLine() , so al you have to do is read the amount of Sales Jessica did for the current month from the console and store it in a variable named "sales".

Next you calculate you actual salary, as the question suggests, she gets 7% of her total sales.
Hence here salary=sales * 7 / 100 Next her federal tax rate is 18%, so now I assume that its 18% of her salary, so store her federal tax rate in another variable and calculate it as fedTax= salary * 18/100 Similarly you calculate and store the other parameters, and in the end after you have calculated all of them nicely format them and display them using Console.Write()


Also do not show pride in mentioning your "straight As" they do not necessarily translate in to good programmers and I mostly from experience associate them with book worms who get lost on the first hurdle.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.