//Program to print composite numbers upto n #include #include int main() { int printComp(int),n,p; printf("Enter a number : "); scanf("%d",&n); printf("Composite numbers upto %d : ",n); p=printComp(n); getch(); } //The printComp function int printComp(int a) //a is user input { int f,i,temp,d,v; //v is is used to keep track of divisors for(temp=1;temp<=a;temp++) { v=0; //Reset divisor count to 0 for the term for(d=2;d