I need to write a program where it would ask the user to enter a positive even number,when entered if wrong then it would say value is illegal and will terminate the program. If it is even then program prints out the square of the number.
I have just started programming and i am finding this really hard.please help.
shopnobhumi
0
Light Poster
Recommended Answers
Jump to PostYou're almost dead on, so i'll just fix up the syntax for you. You should note that code tags should be used when posting code. The syntax for code tags is
[ code = cplusplus ]...code goes here [ / code] without any spacesHere's your fixed code
All 4 Replies
skatamatic
371
Practically a Posting Shark
shopnobhumi
0
Light Poster
skatamatic
371
Practically a Posting Shark
Alex Edwards
commented:
Useful advice, and helpful! =)
+4
shopnobhumi
0
Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.