Write a C/C++ program which consists of a user-define function Prime. This function will take a number and check that the number is prime or not if the number is prime Display The number is Prime other wise display The number is not Prime
Call this function in main program.

Recommended Answers

All 4 Replies

Write a C/C++ program which consists of a user-define function Prime. This function will take a number and check that the number is prime or not if the number is prime Display The number is Prime other wise display The number is not Prime
Call this function in main program.

I believe this link will help you to understand better.
Please read it and then post again.

if u have tried ..... tell us then we can help u

hey the thing is its quite easy da!
only thing is please tell us what ur difficulty is!whether u dont know how to write functions or u dont know how to find whether a number is prime?
if its abt function u can check it up online as to how to write a function,
if its how to find whether a number is prime please ask ur teacher to give u a formula or ask her/him to explain u the logic behind testing a number to check whether its prime!

Jimmy, please read this about the language we speak here, please.

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.