#include<iostream>
#include<math.h>
using namespace std;
int main(){
int x = 0;
float z;
cout<<"Enter a number: ";
cin>>z;
for(int k = 0;k <100;k++){
z = z/10;
if(z == floor(z)){
x++;
}else{
break;
}
}
cout<<"The number of zeros is: "<<x<<endl;
return 0;
}
Comments
Leave a comment