Click here to Skip to main content
15,914,608 members
Home / Discussions / C#
   

C#

 
GeneralRe: DIT file size Pin
KoalaCowboy23-Aug-04 5:00
KoalaCowboy23-Aug-04 5:00 
GeneralRe: Application.Exit() Pin
Colin Angus Mackay20-Aug-04 8:21
Colin Angus Mackay20-Aug-04 8:21 
GeneralRe: Application.Exit() Pin
eggie520-Aug-04 12:03
eggie520-Aug-04 12:03 
GeneralRe: Application.Exit() Pin
Not Active20-Aug-04 8:23
mentorNot Active20-Aug-04 8:23 
GeneralRe: Application.Exit() Pin
Alex Leshinsky21-Aug-04 10:00
Alex Leshinsky21-Aug-04 10:00 
GeneralApplication.Exit() Pin
eggie520-Aug-04 8:08
eggie520-Aug-04 8:08 
GeneralDataGrid Scrollbars Pin
ryane20-Aug-04 8:06
ryane20-Aug-04 8:06 
QuestionCan someone help? Pin
Larkdog20-Aug-04 7:59
Larkdog20-Aug-04 7:59 
I am very new to C#, I have tried to make this work but it is very difficult learning this new language.

Scenario: Three salespeople work at Sunshine Hot Tubs - Andrea, Brittany, and Eric. Write a program that prompts the user for a saleperson's initial. While the user does not type 'Z', continue by promting for the amount of a sale that salesperson made. Calculate the saleperson's Commission as 10 percent of the sale amount, and add the commission to a running total for that salesperson. After the user types 'Z' for an initial, display each salesperson's total commission earned.

Here's what I have so far: (I have commented out compiler errors)
using System;

namespace TubSales
{//Namespace
class SalesPeople
{//Class
static void Main(string[] args)
{// Main
char response;
//double Comm;
Console.WriteLine("Please enter your first initial, or type Z to to find your total commision.");
response = GetChar();
while (response == 'A' || response == 'a')
{
Console.WriteLine("Enter the amount of sales you had.");
//CalculateSales();
}
while (response == 'B' || response == 'b')
{
Console.WriteLine("Enter the amount of sales you had.");
Console.ReadLine();
}
while (response == 'E' || response == 'e')
{
Console.WriteLine("Enter the amount of sales you had.");
Console.ReadLine();
}
if (response == 'Z' || response == 'z')
{
Console.WriteLine("Andrea's total commision is {0}.");//,Comm);
Console.WriteLine("Brittany's total commision {0}.");//,Comm);
Console.WriteLine("Eric's total commision {0}.");//,Comm);
}
Console.WriteLine("Have a Nice Day!");
}//Main
//public static double CalculateSales()
//{
//double Sales;
//double Commision;
//Commision = .10;
//double answer;
//inputString = Console.ReadLine(Sales);
//return answer;
//Comm = Sales * Commision;
//}
public static char GetChar()
{
string inputString;
char answer;
inputString = Console.ReadLine();
answer = Convert.ToChar(inputString);
return answer;
}
}//Class
}//Namespace


AnswerRe: Can someone help? Pin
Colin Angus Mackay20-Aug-04 8:09
Colin Angus Mackay20-Aug-04 8:09 
GeneralRe: Can someone help? Pin
Larkdog20-Aug-04 8:22
Larkdog20-Aug-04 8:22 
GeneralRe: Can someone help? Pin
Colin Angus Mackay20-Aug-04 8:40
Colin Angus Mackay20-Aug-04 8:40 
GeneralRe: Can someone help? Pin
Larkdog20-Aug-04 10:06
Larkdog20-Aug-04 10:06 
GeneralRe: Can someone help? Pin
Colin Angus Mackay20-Aug-04 10:48
Colin Angus Mackay20-Aug-04 10:48 
GeneralRe: Can someone help? Pin
je_gonzalez20-Aug-04 13:19
je_gonzalez20-Aug-04 13:19 
GeneralRe: Can someone help? Pin
Colin Angus Mackay20-Aug-04 21:18
Colin Angus Mackay20-Aug-04 21:18 
AnswerRe: Can someone help? Pin
sreejith ss nair20-Aug-04 19:35
sreejith ss nair20-Aug-04 19:35 
GeneralRe: Can someone help? Pin
Colin Angus Mackay21-Aug-04 0:13
Colin Angus Mackay21-Aug-04 0:13 
GeneralRe: Can someone help? Pin
sreejith ss nair21-Aug-04 0:50
sreejith ss nair21-Aug-04 0:50 
GeneralScrollbars Pin
Gary Kirkham20-Aug-04 7:45
Gary Kirkham20-Aug-04 7:45 
GeneralRe: Scrollbars Pin
Nick Parker20-Aug-04 7:59
protectorNick Parker20-Aug-04 7:59 
GeneralRe: Scrollbars Pin
Gary Kirkham20-Aug-04 8:12
Gary Kirkham20-Aug-04 8:12 
GeneralRe: Scrollbars Pin
Werdna20-Aug-04 13:05
Werdna20-Aug-04 13:05 
Generalmfc contron in c# Pin
isamir20-Aug-04 6:44
isamir20-Aug-04 6:44 
GeneralRe: mfc contron in c# Pin
Nick Parker20-Aug-04 7:05
protectorNick Parker20-Aug-04 7:05 
GeneralRe: mfc contron in c# Pin
isamir20-Aug-04 7:30
isamir20-Aug-04 7:30 

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.