Project #13312 - computer science

 

Description:

Loops and repetition are an extremely important part of programming.  They are used in nearly all phases of calculation and control of a program.  Repetition can come from while loops, for loops, counter control, and sentinels.  This program will use loops to identify a prime number or to report the prime factors of a number.  Write a program that

1.      Prompts and reads in a number from the input stream that is greater than 0

2.      Uses a sentinel value of -1 to terminate the input and processing loop to the program (that is, read new values until a -1 is read in at the scanf)

3.      Decides if the number is prime or composite – make sure you tell what number was read in and explicitly state if it is prime or composite

4.      Use a for loop in determining prime or composite and the prime factors, if composite.

5.      If it is composite, list PRIME factors

 

Questions:

1.      What test cases did you use?

2.      Why did you pick those cases?

3.      What was the algorithm you used to determine prime numbers?

 

Deliverables:

1.      Source code for the program with proper headers, comments, variable names, and white space

2.      Executable code that I can run on a Windows 7 box

3.      Flowchart for your code

4.      A copy of the output

5.      Discussion of the problem, including

a.       What the program was meant to accomplish

b.      Problems involved, and how you overcame those problems

c.       What data you used to test your program and how effective that test was at finding errors

 

d.      Answers to the questions asked in the “Question” section

Subject Science
Due By (Pacific Time) 09/25/2013 12:00 am
Report DMCA
TutorRating
pallavi

Chat Now!

out of 1971 reviews
More..
amosmm

Chat Now!

out of 766 reviews
More..
PhyzKyd

Chat Now!

out of 1164 reviews
More..
rajdeep77

Chat Now!

out of 721 reviews
More..
sctys

Chat Now!

out of 1600 reviews
More..
sharadgreen

Chat Now!

out of 770 reviews
More..
topnotcher

Chat Now!

out of 766 reviews
More..
XXXIAO

Chat Now!

out of 680 reviews
More..
All Rights Reserved. Copyright by AceMyHW.com - Copyright Policy