write the program for prime numbers?
Answer Posted / naseer
main(){
int no,i,count=0;
printf("enter any no");
scanf("%d",&no);
//the main logic is here
for(i=2;i<no;i++){
if(no%2==0){
count++;
}
}
if(count>=1)// if the no is less than
//5 then it shows prime
{
printf("not Prime");
}
else
printf("prime");
Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
Explain what is wrong in this statement?
Why do we write return 0 in c?
Explain how do you determine the length of a string value that was stored in a variable?
Write a program to reverse a string.
please help me..... please codes and flowchart plz turbo c lang po yan.....please asap response... 3. Make an astrology program. The user types in his or her birthday (month, day, and year as integer), and the program responds with the user’s zodiac sign, horoscope, and other information related to it. If the user’s birth year falls into a leap year, your program should display an appropriate message for it. NOTES: Conditional Statements: it should be with graphics
Who invented b language?
How will you declare an array of three function pointers where each function receives two ints and returns a float?
Explain what is the concatenation operator?
For what purpose null pointer used?
Why do some versions of toupper act strangely if given an upper-case letter?
main use of recursive function a) processing speed high b) reduce program length/reduce repeated statements c) if you do not, use iterative methods like, for, while or do-while d) all the above
Is sizeof a keyword in c?
What is the difference between volatile and const volatile?
When should the register modifier be used? Does it really help?
What is getch c?