SHARE
TWEET

Untitled

a guest Feb 22nd, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<iostream>
  2. using namespace std;
  3. int main ()
  4. {
  5.     int x;
  6.     cin>>x;
  7.     if(x>=0 && x<=9)
  8.     {
  9.         cout<<1;
  10.     }
  11.     else
  12.  
  13.         if(x>=10 && x<=99)
  14.         {
  15.             cout<<2;
  16.         }
  17.  
  18.     else
  19.     {
  20.         if(x>=100 && x<=999)
  21.         {
  22.             cout<<3;
  23.         }
  24.     }
  25. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top