Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- typedef long long ll;
- ll k =1e7, l =1e5, h =1e3, s= 100;
- void calc(ll n)
- {
- if(n/k >0)
- {
- calc(n/k);
- cout<<" kuti",n%=k;
- }
- if(n/l >0)
- cout<<" "<<n/l<<" "<<"lakh",n%=l;
- if(n/1000 >0)
- cout<<" "<<n/h<<" "<<"hajar",n%=h;
- if(n/100 >0)
- cout<<" "<<n/s<<" "<<"shata",n%=s;
- if(n!=0)
- cout<<" "<<n;
- }
- int main()
- {
- ll n,i=0;
- while(cin>>n)
- {
- cout<<++i<<".";
- if(n== 0)
- cout<<" "<<0;
- else
- calc(n);
- cout<<endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement