Download Beginning Programming (Java) Project p06 CMSC 1513 Prime

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Beginning Programming (Java)
CMSC 1513
Project:
Assignment:
Program Files:
Implementation
Notes:
2
31
73
127
179
233
283
353
419
467
3
37
79
131
181
239
293
359
421
479
Project p06
Prime Numbers
p06
Write a Java program that will print the first 100 prime numbers. Ten prime
numbers are printed on a line and each prime number is right justified in a
field of five spaces as shown below. A new line is printed after the last prime
number.
Project p06 consists of file p06.java.
You must employ functions in your implementation of this project.
5
41
83
137
191
241
307
367
431
487
7
43
89
139
193
251
311
373
433
491
11
13
17
19
23
47
53
59
61
67
97 101 103 107 109
149 151 157 163 167
197 199 211 223 227
257 263 269 271 277
313 317 331 337 347
379 383 389 397 401
439 443 449 457 461
499 503 509 521 523
Figure 2. Output example.
1
29
71
113
173
229
281
349
409
463
541
Related documents