Free Essay

Intro to Programming Pizza Pi Iii Pseudo Code

In: Computers and Technology

Submitted By elizamoreau
Words 341
Pages 2
* Declarations * Constants are needed for * The minimum size a user can enter * 12 * The maximum size a user can enter * 36 * The # of slices in a small pizza * 8 * The # of slices in a medium pizza * 12 * The # of slices in a large pizza * 16 * The # of slices in an extra-large pizza * 24 * Variables are needed for * A Boolean for whether or not the program should exit, set to false by default * A Boolean for whether or not the input passed validation, set to false by default * A String for what the user inputs * An Integer for what the pizza’s diameter is, assuming it passes validation * Input * Ask the user for input and then read it * If the user input is the number 0, the exit variable is set to true and the loop is broken * Check if the input is valid, to be valid it must meet these parameters * Input must be above the number 12 * Input must be below the number 36 * Input must be a number * If the input is not between 12 and 36, tell the user and loop back to the initial prompt * If the input is not between a number, tell the user and loop back to the initial prompt * If validation is passed, the validation variable is set to true and the loop is ended * Processing and Output * If the validation variable is true and the exit variable is false determine the number of pizza slices * Diameters of 12” up to and including 20” can only be cut in eight slices. * Diameters larger than 20” up to and including 24” can be cut into a maximum of 12 slices. * Diameters larger than 24” up to and including 30” can be cut into a maximum of 16 slices. * Diameters larger than 30” can be cut into a maximum of 24 slices * When the number of slices are outputted, the program loops back to the start * If validation is false and the exit variable is true, the primary loop ends and the program exits

Similar Documents

Premium Essay

Tongue and Quill

...The Tongue and Quill AFH 33-337 1 AUGUST 2004 Communication is an essential tool for the twenty-first century Air Force BY ORDER OF THE SECRETARY OF THE AIR FORCE AIR FORCE HANDBOOK 33-337 1 AUGUST 2004 Communications and Information THE TONGUE AND QUILL COMMUNICATING IS A POWERFUL TOOL FOR THE TWENTY-FIRST CENTURY AIR FORCE The Tongue and Quill is dedicated to every man and woman in today’s Air Force who will ever sling ink at paper, pound a keyboard, give a briefing, or staff a package to support the mission. Currently, The Tongue and Quill is widely used by Air Force military and civilian members, professional military school educators and students, and civilian corporations around the United States. As United States Air Force employees, it is important we communicate clearly and effectively to carry out our mission. This handbook together with AFMAN 33-326, Preparing Official Communications, will provide the necessary information to ensure clear communications— written or spoken. The use of the name or mark of any specific manufacturer, commercial product, commodity, or service in this publication does not imply endorsement by the Air Force To all you enthusiastic users worldwide, keep up the good fight! SUMMARY OF REVISIONS This revision improved organization; rearranged layout; updated quotes, art and word lists; and added material on preparing to write and speak, writing with focus, communicating to persuade, research, meetings, briefings and......

Words: 125419 - Pages: 502

Free Essay

Test2

...62118 0/nm 1/n1 2/nm 3/nm 4/nm 5/nm 6/nm 7/nm 8/nm 9/nm 1990s 0th/pt 1st/p 1th/tc 2nd/p 2th/tc 3rd/p 3th/tc 4th/pt 5th/pt 6th/pt 7th/pt 8th/pt 9th/pt 0s/pt a A AA AAA Aachen/M aardvark/SM Aaren/M Aarhus/M Aarika/M Aaron/M AB aback abacus/SM abaft Abagael/M Abagail/M abalone/SM abandoner/M abandon/LGDRS abandonment/SM abase/LGDSR abasement/S abaser/M abashed/UY abashment/MS abash/SDLG abate/DSRLG abated/U abatement/MS abater/M abattoir/SM Abba/M Abbe/M abbé/S abbess/SM Abbey/M abbey/MS Abbie/M Abbi/M Abbot/M abbot/MS Abbott/M abbr abbrev abbreviated/UA abbreviates/A abbreviate/XDSNG abbreviating/A abbreviation/M Abbye/M Abby/M ABC/M Abdel/M abdicate/NGDSX abdication/M abdomen/SM abdominal/YS abduct/DGS abduction/SM abductor/SM Abdul/M ab/DY abeam Abelard/M Abel/M Abelson/M Abe/M Aberdeen/M Abernathy/M aberrant/YS aberrational aberration/SM abet/S abetted abetting abettor/SM Abeu/M abeyance/MS abeyant Abey/M abhorred abhorrence/MS abhorrent/Y abhorrer/M abhorring abhor/S abidance/MS abide/JGSR abider/M abiding/Y Abidjan/M Abie/M Abigael/M Abigail/M Abigale/M Abilene/M ability/IMES abjection/MS abjectness/SM abject/SGPDY abjuration/SM abjuratory abjurer/M abjure/ZGSRD ablate/VGNSDX ablation/M ablative/SY ablaze abler/E ables/E ablest able/U abloom ablution/MS Ab/M ABM/S abnegate/NGSDX abnegation/M Abner/M abnormality/SM abnormal/SY ab......

Words: 113589 - Pages: 455