Click here to Skip to main content
15,913,722 members
Home / Discussions / C#
   

C#

 
AnswerRe: Attach autorun.inf to setup Pin
Richard MacCutchan12-Oct-11 23:29
mveRichard MacCutchan12-Oct-11 23:29 
GeneralRe: Attach autorun.inf to setup Pin
lukeer12-Oct-11 23:52
lukeer12-Oct-11 23:52 
QuestionHow to Zip Folder in C# Pin
Sunil G 312-Oct-11 18:40
Sunil G 312-Oct-11 18:40 
AnswerRe: How to Zip Folder in C# Pin
Dennis E White12-Oct-11 19:50
professionalDennis E White12-Oct-11 19:50 
AnswerRe: How to Zip Folder in C# Pin
Abhinav S12-Oct-11 20:24
Abhinav S12-Oct-11 20:24 
AnswerRe: How to Zip Folder in C# PinPopular
BobJanova12-Oct-11 23:22
BobJanova12-Oct-11 23:22 
GeneralRe: How to Zip Folder in C# Pin
harold aptroot13-Oct-11 5:46
harold aptroot13-Oct-11 5:46 
QuestionNeed lots of help! Pin
Bobbybrown1212-Oct-11 9:42
Bobbybrown1212-Oct-11 9:42 
Anyways I noticed how wrong my last code was so far.

// DECLARATIONS
// Declaring all my variables

const decimal SLICE_OF_PIZZA_AREA = 14.125M; //
const int diameter_12_16 = 8;
double diameterPizza;
double slicesPizza;
double area;


//INPUT
// Prompt for and get input from user

Console.Write("Please enter the diameter of your pizza:";

diameterPizza = Convert.ToInt32(Console.ReadLine()); // reads the line of text from the keyboard

// PROCESSING

if (diameterPizza >= diameter_12_and_16)






// END
// This allows the user to read what has been outputted then simply press any key to end.

Console.WriteLine("\n\nPress any key to end this application...");
Console.ReadKey();

That is the code I have so far the problem I am having with is these instructions and I feel really dumb, I am not able to understand what to do.

• Prompt the user to enter the diameter of a pizza in inches, that value will be implemented in the determination of the number of slices to cut that pizza into.

• Use a compound condition test to check that the diameter entered is within the range of 12” to 36” inclusive.

• When the diameter entered is good, determine the number of slices to cut the pizza in using an “if … else if” decision structure based on the following:

Diameters of 12” to < 16” cut in eight slices.

Diameters of 16” to < 24” cut in 12 slices.

Diameters of 24” to < 30” cut in 16 slices.

Diameters of 30” to 36” cut in 24 slices.

Calculate the area of the pizza in question, and then calculate the area of each slice.

Display the number of slices that should be cut from a pizza that size along with the area of each slice, formatted as shown in the sample output above.

• When the diameter entered is outside of the allowable range, display an appropriate error message.

• In either case, good or bad diameter entry, end the program when the user presses any key.

Sorry for the wall of text, anyways my next question is how do all this I have no idea. any hints would be great!!
AnswerRe: Need lots of help! Pin
DaveyM6912-Oct-11 9:52
professionalDaveyM6912-Oct-11 9:52 
GeneralRe: Need lots of help! Pin
Bobbybrown1212-Oct-11 10:02
Bobbybrown1212-Oct-11 10:02 
GeneralMessage Removed Pin
12-Oct-11 10:18
professionalN_tro_P12-Oct-11 10:18 
GeneralRe: Need lots of help! Pin
Bobbybrown1212-Oct-11 10:23
Bobbybrown1212-Oct-11 10:23 
GeneralRe: Need lots of help! Pin
DaveyM6912-Oct-11 10:24
professionalDaveyM6912-Oct-11 10:24 
GeneralMessage Removed Pin
12-Oct-11 10:43
professionalN_tro_P12-Oct-11 10:43 
GeneralRe: Need lots of help! Pin
DaveyM6912-Oct-11 10:45
professionalDaveyM6912-Oct-11 10:45 
GeneralRe: Need lots of help! Pin
Alisaunder13-Oct-11 4:31
Alisaunder13-Oct-11 4:31 
GeneralRe: Need lots of help! Pin
BobJanova13-Oct-11 4:53
BobJanova13-Oct-11 4:53 
GeneralRe: Need lots of help! Pin
Alisaunder14-Oct-11 0:59
Alisaunder14-Oct-11 0:59 
GeneralRe: Need lots of help! Pin
BobJanova14-Oct-11 2:36
BobJanova14-Oct-11 2:36 
GeneralRe: Need lots of help! Pin
BillWoodruff12-Oct-11 15:05
professionalBillWoodruff12-Oct-11 15:05 
GeneralRe: Need lots of help! Pin
BobJanova12-Oct-11 23:11
BobJanova12-Oct-11 23:11 
GeneralRe: Need lots of help! Pin
Richard MacCutchan12-Oct-11 23:23
mveRichard MacCutchan12-Oct-11 23:23 
GeneralRe: Need lots of help! Pin
DaveyM6912-Oct-11 23:57
professionalDaveyM6912-Oct-11 23:57 
GeneralRe: Need lots of help! Pin
BillWoodruff14-Oct-11 18:04
professionalBillWoodruff14-Oct-11 18:04 
GeneralRegarding the style of OO discussion Pin
BobJanova13-Oct-11 3:23
BobJanova13-Oct-11 3:23 

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.