Home
About Us
Contact Us
Bookmark
Saved Bookmarks
Current Affairs
General Knowledge
Chemical Engineering
UPSEE
BSNL
ISRO
BITSAT
Amazon
ORACLE
Verbal Ability
→
Class 11
→
Accounts in Class 11
→
WAP to print prime numbers between two given numbe...
1.
WAP to print prime numbers between two given numbers.
Answer» #include
int main(){ int low, high, i, flag;printf("Enter two numbers(intervals): ");scanf("%d %d", &low, &high);printf("Prime numbers between %d and %d are: ", low, high);while (low < high){ flag = 0;for(i = 2; i <= low/2; ++i){ if(low % i == 0){ flag = 1;break; } }if (flag == 0)printf("%d ", low);++low; }return 0; }
Show Answer
Discussion
No Comment Found
Post Comment
Related InterviewSolutions
Input n and print n^2,n^3,n^4
What are String literals?
About halfyearly
What are implicit type conversion
Find out the error in folowing1. Temperature = 90 print temperature
Advantages of python
Storage of i kb means the following number of bytes1) 1000 , 2) 1024 , 3) 964
WAP to print prime numbers between two given numbers.
List the name of two components of cpu
What is the task of presentation software?
Reply to Comment
×
Name
*
Email
*
Comment
*
Submit Reply
Your experience on this site will be improved by allowing cookies. Read
Cookie Policy
Reject
Allow cookies