Click here to Skip to main content
15,898,723 members
Home / Discussions / C#
   

C#

 
AnswerRe: auto-method Pin
il_masacratore24-Oct-07 11:12
il_masacratore24-Oct-07 11:12 
GeneralRe: auto-method Pin
MasterSharp24-Oct-07 11:22
MasterSharp24-Oct-07 11:22 
GeneralRe: auto-method Pin
Christian Graus24-Oct-07 12:28
protectorChristian Graus24-Oct-07 12:28 
QuestionModular Program Pin
murtle324-Oct-07 9:38
murtle324-Oct-07 9:38 
QuestionRe: Modular Program Pin
TJoe24-Oct-07 9:48
TJoe24-Oct-07 9:48 
AnswerRe: Modular Program Pin
murtle324-Oct-07 19:06
murtle324-Oct-07 19:06 
GeneralRe: Modular Program Pin
PandemoniumPasha24-Oct-07 19:30
PandemoniumPasha24-Oct-07 19:30 
GeneralRe: Modular Program Pin
murtle324-Oct-07 19:38
murtle324-Oct-07 19:38 
Okay, I fixed the defined variables...but now I get a bunch of errors saying invalid "{"'s and "}"'s after the methods and stuff plus "expected class, delegate, enum, interface, or struct" for the voids. And this is what I've got for coding:

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

namespace Program5
{
class Program
{

const double DEPINS = 25.50;
const double TAX = .23;
int dep;
double grossPay, hourRate, hourWorked, deduct, netPay, depIns, tax;
static void getData()
{
Console.Write("Hours Worked: ");
hourWorked = Double.Parse(Console.ReadLine());

Console.Write("Hourly Rate: ");
hourRate = Double.Parse(Console.ReadLine());

Console.Write("Dependents: ");
dep = Int32.Parse(Console.ReadLine());
}

static void calcNet()
{
if (hourWorked >= 40)
grossPay = Math.Round(1.5 * hourRate * hourWorked, 2);

else
grossPay = Math.Round(hourRate * hourWorked, 2);


depIns = dep * DEPINS;
tax = grossPay * TAX;
deduct = Math.Round(depIns + tax, 2);
netPay = grossPay - deduct;
}

static void dspData();
{

Console.WriteLine("");
Console.WriteLine("Hours Worked: {0,9:n}", hourWorked);
Console.WriteLine("Hourly Rate: {0,9:n}", hourRate);
Console.WriteLine("Dependents: {0,9}", dep);
Console.WriteLine("Gross Pay: {0,9:n}", grossPay);
Console.WriteLine("Deductions: {0,9:n}", deduct);
Console.WriteLine(" ---------");
Console.WriteLine("Net Pay: {0,9:c}", netPay);
}
static void Main();
{
getData()
calcNet()
dspData()
}
}
}
AnswerRe: Modular Program Pin
PandemoniumPasha24-Oct-07 19:51
PandemoniumPasha24-Oct-07 19:51 
GeneralRe: Modular Program Pin
murtle325-Oct-07 4:02
murtle325-Oct-07 4:02 
AnswerRe: Modular Program Pin
Christian Graus24-Oct-07 12:52
protectorChristian Graus24-Oct-07 12:52 
QuestionHow to remove part of the text in RichTextBox Pin
Ermak8624-Oct-07 9:05
Ermak8624-Oct-07 9:05 
AnswerRe: How to remove part of the text in RichTextBox Pin
TJoe24-Oct-07 9:27
TJoe24-Oct-07 9:27 
GeneralRe: How to remove part of the text in RichTextBox Pin
Ermak8624-Oct-07 10:02
Ermak8624-Oct-07 10:02 
AnswerRe: Open Default Defragmenter Pin
TJoe24-Oct-07 9:00
TJoe24-Oct-07 9:00 
GeneralRe: Open Default Defragmenter Pin
andyr200524-Oct-07 9:08
andyr200524-Oct-07 9:08 
Questionvariable out of scope Pin
Payrok24-Oct-07 8:07
Payrok24-Oct-07 8:07 
AnswerRe: variable out of scope Pin
TJoe24-Oct-07 8:16
TJoe24-Oct-07 8:16 
AnswerRe: variable out of scope Pin
Guffa24-Oct-07 8:59
Guffa24-Oct-07 8:59 
AnswerRe: variable out of scope Pin
Pete O'Hanlon24-Oct-07 9:05
mvePete O'Hanlon24-Oct-07 9:05 
GeneralRe: variable out of scope Pin
Payrok24-Oct-07 9:09
Payrok24-Oct-07 9:09 
GeneralRe: variable out of scope Pin
TJoe24-Oct-07 9:10
TJoe24-Oct-07 9:10 
GeneralRe: variable out of scope Pin
Pete O'Hanlon24-Oct-07 9:16
mvePete O'Hanlon24-Oct-07 9:16 
QuestionOpen Default Defragmenter Pin
andyr200524-Oct-07 7:47
andyr200524-Oct-07 7:47 
QuestionInstallation prerequisites Pin
JoZ CaVaLLo24-Oct-07 6:46
JoZ CaVaLLo24-Oct-07 6:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.