#include<stdio.h>
#include<iostream>
#include<string.h>
#define REP(i,n) for(i=0;i<n;i++)
using namespace std;
int main()
{
long long t=1,i,l,s;
while(cin>>s)
{
printf("%4d.",t++);
long ar[100]= {0},v[100]= {0},k=0,m=0,flag=0;
string str[100];
if(s==0)
{
cout<<" 0"<<endl;
continue;
}
while(s!=0)
{
ar[k++]=s%10;
s/=10;
}
str[5]="shata";
str[6]="hajar";
str[7]="lakh";
str[8]="kuti";
str[4]="kuti";
str[3]="lakh";
str[2]="hajar";
str[1]="shata";
v[m++]=ar[1]*10+ar[0];
v[m++]=ar[2];
v[m++]=ar[4]*10+ar[3];
v[m++]=ar[6]*10+ar[5];
v[m++]=ar[8]*10+ar[7];
v[m++]=ar[9];
v[m++]=ar[11]*10+ar[10];
v[m++]=ar[13]*10+ar[12];
v[m++]=ar[14];
if(v[4]!=0||v[5]!=0||v[6]!=0||v[7]!=0||v[8]!=0)
flag=1;
for(i=m-1; i>=0; i--)
{
if(v[i]!=0)
{
cout<<" "<<v[i];
if(i!=0)
cout<<" "<<str[i];
}
else if(i==4&&v[4]==0&&flag==1)
{
cout<<" kuti";
}
}
cout<<endl;
}
return 0;
}
#include<iostream>
#include<string.h>
#define REP(i,n) for(i=0;i<n;i++)
using namespace std;
int main()
{
long long t=1,i,l,s;
while(cin>>s)
{
printf("%4d.",t++);
long ar[100]= {0},v[100]= {0},k=0,m=0,flag=0;
string str[100];
if(s==0)
{
cout<<" 0"<<endl;
continue;
}
while(s!=0)
{
ar[k++]=s%10;
s/=10;
}
str[5]="shata";
str[6]="hajar";
str[7]="lakh";
str[8]="kuti";
str[4]="kuti";
str[3]="lakh";
str[2]="hajar";
str[1]="shata";
v[m++]=ar[1]*10+ar[0];
v[m++]=ar[2];
v[m++]=ar[4]*10+ar[3];
v[m++]=ar[6]*10+ar[5];
v[m++]=ar[8]*10+ar[7];
v[m++]=ar[9];
v[m++]=ar[11]*10+ar[10];
v[m++]=ar[13]*10+ar[12];
v[m++]=ar[14];
if(v[4]!=0||v[5]!=0||v[6]!=0||v[7]!=0||v[8]!=0)
flag=1;
for(i=m-1; i>=0; i--)
{
if(v[i]!=0)
{
cout<<" "<<v[i];
if(i!=0)
cout<<" "<<str[i];
}
else if(i==4&&v[4]==0&&flag==1)
{
cout<<" kuti";
}
}
cout<<endl;
}
return 0;
}
কোন মন্তব্য নেই:
একটি মন্তব্য পোস্ট করুন