Without using /,% and * operators. write a function to divide a number by 3?
#include
#include
void main()
{
int i,n;
float j=0;
clrscr();
printf(”enter the no”);
scanf(”%d”,&n);
for(i=n;i>2;i=i-3)
{
j=j+1;
if(i==4)
{
j=j+1.333333;
}
if(i==5)
{
j=j+1.666666;
}
}
printf(”%f”,j);
getch();
}