اینو ببین:
#include<iostream.h>
void main()
{
float x=25.31454;
int n=x,count=0;
float y=x;
while(n>0)
{
n/=10;
count++;
}
cout<<"sahih :"<<count<<endl;
count=0;
while(int(y)!=y)
{
y*=10;
count++;
}
cout<<"Ashar :"<<count<<endl;
}
اینو ببین:
#include<iostream.h>
void main()
{
float x=25.31454;
int n=x,count=0;
float y=x;
while(n>0)
{
n/=10;
count++;
}
cout<<"sahih :"<<count<<endl;
count=0;
while(int(y)!=y)
{
y*=10;
count++;
}
cout<<"Ashar :"<<count<<endl;
}