Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- int main ()
- {
- int x;
- cin>>x;
- if(x>=0 && x<=9)
- {
- cout<<1;
- }
- else
- if(x>=10 && x<=99)
- {
- cout<<2;
- }
- else
- {
- if(x>=100 && x<=999)
- {
- cout<<3;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement