Last active
January 4, 2016 21:39
-
-
Save KT-Yeh/8682499 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdio> | |
using namespace std; | |
void bangla(long long int n) | |
{ | |
if (n >= 10000000){ | |
bangla (n / 10000000); | |
printf (" kuti"); | |
n %= 10000000; | |
} | |
if (n >= 100000){ | |
bangla (n / 100000); | |
printf (" lakh"); | |
n %= 100000; | |
} | |
if (n >= 1000){ | |
bangla (n / 1000); | |
printf (" hajar"); | |
n %= 1000; | |
} | |
if (n >= 100){ | |
bangla (n / 100); | |
printf (" shata"); | |
n %= 100; | |
} | |
if (n) | |
printf (" %d",n); | |
} | |
int main() | |
{ | |
long long int n; | |
int Case=1; | |
while (scanf("%lld",&n)!=EOF){ | |
printf ("%4d.",Case++); | |
if (n==0) printf(" 0"); | |
bangla (n); | |
printf("\n"); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment