#include<stdio.h>
#include<conio.h>
#include<iostream.h>
void main()
{
int a,b,count=0;
cout<<"division of two inter digits without '/' operator\n";
cout<<"enter first no=";
cin>>a;
cout<<"enter second no=";
cin>>b;
a=a-b;
while(a>=0)
{
count++;
a=a-b;
}
cout<<"the result is="<<count;
getch();
}
#include<conio.h>
#include<iostream.h>
void main()
{
int a,b,count=0;
cout<<"division of two inter digits without '/' operator\n";
cout<<"enter first no=";
cin>>a;
cout<<"enter second no=";
cin>>b;
a=a-b;
while(a>=0)
{
count++;
a=a-b;
}
cout<<"the result is="<<count;
getch();
}
0 comments:
Post a Comment