PRIME_NO - "); scanf("%d",&no);...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
// PRIME NO.// / #include<stdio.h> #include<conio.h> # void main(void) { int a,b,x,no; clrscr(); printf("enter the number for the range of prime number:
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: "); scanf("%d",&no); for(a=2;a<=no;a++) { x=1; for(b=2;x!=0;b++) { x=a%b; if(a==b && x==0) printf("%d ",a); } } getch(); }...
View Full Document

This note was uploaded on 11/06/2010 for the course UBIT 411 taught by Professor Saleemelahi during the Spring '10 term at University of Karachi.

Ask a homework question - tutors are online