×

# PRIME1-HELP

 0 I'm just a newbie, Iwas solving PRIME1 and my solution is here. Please help me where I'm doing wrong. Thank you in advance. :) This question is marked "community wiki". asked 26 Apr '15, 20:38 4★arpn 464●4●16 accept rate: 29%

 1 You have a line in main() : if(temp==m) temp+=p; This line is wrong. Change it to if(temp==p) temp+=p; This is because if the present value if itself a prime, we need to print it. answered 27 Apr '15, 09:23 893●2●11●34 accept rate: 10% Thank you :). Thanks a lot. :) (27 Apr '15, 10:10) arpn4★
 toggle preview community wiki:
Preview

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• image?![alt text](/path/img.jpg "title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported
• mathemetical formulas in Latex between \$ symbol

Question tags:

×2,700
×1,056
×69

question asked: 26 Apr '15, 20:38

question was seen: 737 times

last updated: 27 Apr '15, 10:11