Jump to content
xisto Community
Sign in to follow this  
iGuest

problem I can not know how to do it ,, HELP.. Need Help With C Program To Test If A Number Is Prime

Recommended Posts

problem I can not know how to do it ,, HELP..Need Help With C Program To Test If A Number Is Prime

 

Write a program that reads a set of integer numbers and performs the following :

If the number is smaller than zero, then the program prints the ?ERROR:Number not allowed?,Compute the sum of all the positive numbers, and stops reading the remaining numbers. If the number is bigger than 100, then the program prints " Skip the number' reads the next number and coumpute the sum of all number less than 100 and greater than zero.  All other numbers should be read and printed. Your program should keep reading numbers until a zero is read or an error occurred. You assume that the input has at least one number, either valid or not.

-question by flower

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.