#include<bits/stdc++.h>
#define ll unsigned long long int
using namespace std;
int main()
{
ll n, i = 1;
while(cin >> n && n >= 0)
{
cout << right << setw(4) << setfill(' ') << i++ << ".";
if(n == 0)
{
cout << " " << n << endl;
continue;
}
ll kuti, lak, hazar, shata, sm;
kuti = n/10000000;
if(kuti > 0)
{
ll k_kuti, k_lak, k_hazar, k_shata, k_sm;
k_kuti = kuti/10000000;
if(k_kuti > 0)
{
cout << " " << k_kuti << " kuti";
kuti = kuti%10000000;
}
k_lak = kuti/100000;
if(k_lak > 0)
{
cout << " " << k_lak << " lakh";
kuti = kuti%100000;
}
k_hazar = kuti/1000;
if(k_hazar > 0)
{
cout << " " << k_hazar << " hajar";
kuti = kuti%1000;
}
k_shata = kuti/100;
if(k_shata > 0)
{
cout << " " << k_shata << " shata";
kuti = kuti%100;
}
if(kuti>0)
cout << " " << kuti;
cout << " " << "kuti";
n = n%10000000;
}
lak = n/100000;
if(lak > 0)
{
cout << " " << lak << " lakh";
n = n%100000;
}
hazar = n/1000;
if(hazar > 0)
{
cout << " " << hazar << " hajar";
n = n%1000;
}
shata = n/100;
if(shata > 0)
{
cout << " " << shata << " shata";
n = n%100;
}
if(n > 0)
cout << " " << n;
cout << endl;
}
return 0;
}
#define ll unsigned long long int
using namespace std;
int main()
{
ll n, i = 1;
while(cin >> n && n >= 0)
{
cout << right << setw(4) << setfill(' ') << i++ << ".";
if(n == 0)
{
cout << " " << n << endl;
continue;
}
ll kuti, lak, hazar, shata, sm;
kuti = n/10000000;
if(kuti > 0)
{
ll k_kuti, k_lak, k_hazar, k_shata, k_sm;
k_kuti = kuti/10000000;
if(k_kuti > 0)
{
cout << " " << k_kuti << " kuti";
kuti = kuti%10000000;
}
k_lak = kuti/100000;
if(k_lak > 0)
{
cout << " " << k_lak << " lakh";
kuti = kuti%100000;
}
k_hazar = kuti/1000;
if(k_hazar > 0)
{
cout << " " << k_hazar << " hajar";
kuti = kuti%1000;
}
k_shata = kuti/100;
if(k_shata > 0)
{
cout << " " << k_shata << " shata";
kuti = kuti%100;
}
if(kuti>0)
cout << " " << kuti;
cout << " " << "kuti";
n = n%10000000;
}
lak = n/100000;
if(lak > 0)
{
cout << " " << lak << " lakh";
n = n%100000;
}
hazar = n/1000;
if(hazar > 0)
{
cout << " " << hazar << " hajar";
n = n%1000;
}
shata = n/100;
if(shata > 0)
{
cout << " " << shata << " shata";
n = n%100;
}
if(n > 0)
cout << " " << n;
cout << endl;
}
return 0;
}
Comments
Post a Comment