#include<stdio.h>#include<conio.h>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();}

2 Users have rated as useful.

Login to rate this answer.

The number is N, the decimal places to which the division will be done is D.int quot=0,remainder=0,rem=0;int x=0;Void DivisionBySubtraction(N,D){ while(N>=3) { N-=3; ++quot; } if (N==0) cout<<"quotient="<<quot; else { while(x<D) { N*=10; while(N>=3) { N-=3; rem++; } remainder = remainder*10+rem; if (N==0) break; ++x; } } cout<<"remainder="<<remainder;}

1 User has rated as useful.

Login to rate this answer.

Can we use logarithm."logarithm of a number-logarithm of 3".Taking antilog gives the result

1 User has rated as useful.

Login to rate this answer.

void dvdby3(int n){int count=0,rem;while(n>0){rem=n;//remindern=n-3;count++;}}

Login to rate this answer.

quo=-1;rem=0;//n the number enteredfor(i=0;i<=n;i+=3){quo+=1;}rem=n-i+3;printf("%d is the quotient n%d is the remainder",quo,rem);

Login to rate this answer.

Int quoitent=-1, rem=0;int number;while(number>=0){ rem=number; quoitent +=1; //quoitent= quoitent+1; number -=3; //number=number-3;}

Login to rate this answer.

**Alok Mishra**
Answered On : Aug 4th, 2011

{geshibot language="c"}#include
#include
void main()
{
int i,n;
float m,j=0;
clrscr();
printf("enter the no");
scanf("%d",&n);
if(n==1)
{
m=0.3333;
printf("%f",m);
}
if(n==2)
{
m=0.6666;
printf("%f",m);
}
if(n >= 3)
{
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();
}
}{/geshibot}

Login to rate this answer.