Sh3ll
OdayForums


Server : Apache
System : Linux profile 3.10.0-1160.88.1.el7.x86_64 #1 SMP Tue Mar 7 15:41:52 UTC 2023 x86_64
User : apache ( 48)
PHP Version : 8.0.28
Disable Function : NONE
Directory :  /var/www/html/venkat/old/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //var/www/html/venkat/old/lit2015038_1.c
//Write a C program to find all the composite numbers in the given range using a function
#include<stdio.h>
void printcomposite(int,int);
int main()
{
   int a,b,i,j;

   scanf("%d%d",&a,&b);
   printcomposite(a,b);
   return 0;
}



void printcomposite(int a,int b)
{
   int i,j;

   for(i=a;i<=b;i++)
   {
      for(j=2;j<=i-1;j++)
      {
         if(i%j==0)
            break;
      }
      if(j!=i)
      {
         printf("%d ",i);
      }
   }
}


ZeroDay Forums Mini