private string BDTtakatowords(Int64 BDTtaka)
{
string result="";
if ((BDTtaka >= 1) && (BDTtaka 9 && BDTtaka < 20)
{
if (BDTtaka == 11) result = "Eleven";
if (BDTtaka == 12) result = "Twelve";
if (BDTtaka == 13) result = "Thirteen";
if (BDTtaka == 14) result = "Forteen";
if (BDTtaka == 15) result = "Fifteen";
if (BDTtaka == 16) result = "Sixteen";
if (BDTtaka == 17) result = "Seventeen";
if (BDTtaka == 18) result = "Eighteen";
if (BDTtaka == 19) result = "Nineteen";
if (BDTtaka == 20) result = "Twenty";
}
if (BDTtaka > 20 && (BDTtaka / 10) == 2 && (BDTtaka % 10) == 0) result = "Twenty";
if (BDTtaka > 20 && (BDTtaka / 10) == 3 && (BDTtaka % 10) == 0) result = "Thirty";
if (BDTtaka > 20 && (BDTtaka / 10) == 4 && (BDTtaka % 10) == 0) result = "Forty";
if (BDTtaka > 20 && (BDTtaka / 10) == 5 && (BDTtaka % 10) == 0) result = "Fifty";
if (BDTtaka > 20 && (BDTtaka / 10) == 6 && (BDTtaka % 10) == 0) result = "Sixty";
if (BDTtaka > 20 && (BDTtaka / 10) == 7 && (BDTtaka % 10) == 0) result = "Seventy";
if (BDTtaka > 20 && (BDTtaka / 10) == 8 && (BDTtaka % 10) == 0) result = "Eighty";
if (BDTtaka > 20 && (BDTtaka / 10) == 9 && (BDTtaka % 10) == 0) result = "Ninty";
if (BDTtaka > 20 && (BDTtaka / 10) == 2 && (BDTtaka % 10) != 0)
{
if ((BDTtaka % 10) == 0) result = "Twenty";
if ((BDTtaka % 10) == 1) result = "Twenty One";
if ((BDTtaka % 10) == 2) result = "Twenty Two";
if ((BDTtaka % 10) == 3) result = "Twenty Three";
if ((BDTtaka % 10) == 4) result = "Twenty Four";
if ((BDTtaka % 10) == 5) result = "Twenty Five";
if ((BDTtaka % 10) == 6) result = "Twenty Six";
if ((BDTtaka % 10) == 7) result = "Twenty Seven";
if ((BDTtaka % 10) == 8) result = "Twenty Eight";
if ((BDTtaka % 10) == 9) result = "Twenty Nine";
}
if (BDTtaka > 20 && (BDTtaka / 10) == 3 && (BDTtaka % 10) != 0)
{
if ((BDTtaka % 10) == 1) result = "Thirty One";
if ((BDTtaka % 10) == 2) result = "Thirty Two";
if ((BDTtaka % 10) == 3) result = "Thirty Three";
if ((BDTtaka % 10) == 4) result = "Thirty Four";
if ((BDTtaka % 10) == 5) result = "Thirty Five";
if ((BDTtaka % 10) == 6) result = "Thirty Six";
if ((BDTtaka % 10) == 7) result = "Thirty Seven";
if ((BDTtaka % 10) == 8) result = "Thirty Eight";
if ((BDTtaka % 10) == 9) result = "Thirty Nine";
}
if (BDTtaka > 20 && (BDTtaka / 10) == 4 && (BDTtaka % 10) != 0)
{
if ((BDTtaka % 10) == 1) result = "Forty One";
if ((BDTtaka % 10) == 2) result = "Forty Two";
if ((BDTtaka % 10) == 3) result = "Forty Three";
if ((BDTtaka % 10) == 4) result = "Forty Four";
if ((BDTtaka % 10) == 5) result = "Forty Five";
if ((BDTtaka % 10) == 6) result = "Forty Six";
if ((BDTtaka % 10) == 7) result = "Forty Seven";
if ((BDTtaka % 10) == 8) result = "Forty Eight";
if ((BDTtaka % 10) == 9) result = "Forty Nine";
}
if (BDTtaka > 20 && (BDTtaka / 10) == 5 && (BDTtaka % 10) != 0)
{
if ((BDTtaka % 10) == 1) result = "Fifty One";
if ((BDTtaka % 10) == 2) result = "Fifty Two";
if ((BDTtaka % 10) == 3) result = "Fifty Three";
if ((BDTtaka % 10) == 4) result = "Fifty Four";
if ((BDTtaka % 10) == 5) result = "Fifty Five";
if ((BDTtaka % 10) == 6) result = "Fifty Six";
if ((BDTtaka % 10) == 7) result = "Fifty Seven";
if ((BDTtaka % 10) == 8) result = "Fifty Eight";
if ((BDTtaka % 10) == 9) result = "Fifty Nine";
}
if (BDTtaka > 20 && (BDTtaka / 10) == 6 && (BDTtaka % 10) != 0)
{
if ((BDTtaka % 10) == 1) result = "Sixty One";
if ((BDTtaka % 10) == 2) result = "Sixty Two";
if ((BDTtaka % 10) == 3) result = "Sixty Three";
if ((BDTtaka % 10) == 4) result = "Sixty Four";
if ((BDTtaka % 10) == 5) result = "Sixty Five";
if ((BDTtaka % 10) == 6) result = "Sixty Six";
if ((BDTtaka % 10) == 7) result = "Sixty Seven";
if ((BDTtaka % 10) == 8) result = "Sixty Eight";
if ((BDTtaka % 10) == 9) result = "Sixty Nine";
}
if (BDTtaka > 20 && (BDTtaka / 10) == 7 && (BDTtaka % 10) != 0)
{
if ((BDTtaka % 10) == 1) result = "Seventy One";
if ((BDTtaka % 10) == 2) result = "Seventy Two";
if ((BDTtaka % 10) == 3) result = "Seventy Three";
if ((BDTtaka % 10) == 4) result = "Seventy Four";
if ((BDTtaka % 10) == 5) result = "Seventy Five";
if ((BDTtaka % 10) == 6) result = "Seventy Six";
if ((BDTtaka % 10) == 7) result = "Seventy Seven";
if ((BDTtaka % 10) == 8) result = "Seventy Eight";
if ((BDTtaka % 10) == 9) result = "Seventy Nine";
}
if (BDTtaka > 20 && (BDTtaka / 10) == 8 && (BDTtaka % 10) != 0)
{
if ((BDTtaka % 10) == 1) result = "Eighty One";
if ((BDTtaka % 10) == 2) result = "Eighty Two";
if ((BDTtaka % 10) == 3) result = "Eighty Three";
if ((BDTtaka % 10) == 4) result = "Eighty Four";
if ((BDTtaka % 10) == 5) result = "Eighty Five";
if ((BDTtaka % 10) == 6) result = "Eighty Six";
if ((BDTtaka % 10) == 7) result = "Eighty Seven";
if ((BDTtaka % 10) == 8) result = "Eighty Eight";
if ((BDTtaka % 10) == 9) result = "Eighty Nine";
}
if (BDTtaka > 20 && (BDTtaka / 10) == 9 && (BDTtaka % 10) != 0)
{
if ((BDTtaka % 10) == 1) result = "Ninty One";
if ((BDTtaka % 10) == 2) result = "Ninty Two";
if ((BDTtaka % 10) == 3) result = "Ninty Three";
if ((BDTtaka % 10) == 4) result = "Ninty Four";
if ((BDTtaka % 10) == 5) result = "Ninty Five";
if ((BDTtaka % 10) == 6) result = "Ninty Six";
if ((BDTtaka % 10) == 7) result = "Ninty Seven";
if ((BDTtaka % 10) == 8) result = "Ninty Eight";
if ((BDTtaka % 10) == 9) result = "Ninty Nine";
}
return result;
}
protected void Button1_Click(object sender, System.EventArgs e)
{
TextBox2.Text = BDTtaka(Convert.ToInt64(TextBox1.Text));
}
< /code>
Проблема: когда я вступаю в текст1, например, 20 или 20000 или 2000000, показываю только таку или только тысячу таку или только лака таку соответственно. Но должен показать двадцать или двадцать тысяч или двадцать лаков соответственно.
Подробнее здесь: https://stackoverflow.com/questions/173 ... y-to-words
Перевод валюты Бангладеш на слова ⇐ C#
Место общения программистов C#
1758294240
Anonymous
private string BDTtakatowords(Int64 BDTtaka)
{
string result="";
if ((BDTtaka >= 1) && (BDTtaka 9 && BDTtaka < 20)
{
if (BDTtaka == 11) result = "Eleven";
if (BDTtaka == 12) result = "Twelve";
if (BDTtaka == 13) result = "Thirteen";
if (BDTtaka == 14) result = "Forteen";
if (BDTtaka == 15) result = "Fifteen";
if (BDTtaka == 16) result = "Sixteen";
if (BDTtaka == 17) result = "Seventeen";
if (BDTtaka == 18) result = "Eighteen";
if (BDTtaka == 19) result = "Nineteen";
if (BDTtaka == 20) result = "Twenty";
}
if (BDTtaka > 20 && (BDTtaka / 10) == 2 && (BDTtaka % 10) == 0) result = "Twenty";
if (BDTtaka > 20 && (BDTtaka / 10) == 3 && (BDTtaka % 10) == 0) result = "Thirty";
if (BDTtaka > 20 && (BDTtaka / 10) == 4 && (BDTtaka % 10) == 0) result = "Forty";
if (BDTtaka > 20 && (BDTtaka / 10) == 5 && (BDTtaka % 10) == 0) result = "Fifty";
if (BDTtaka > 20 && (BDTtaka / 10) == 6 && (BDTtaka % 10) == 0) result = "Sixty";
if (BDTtaka > 20 && (BDTtaka / 10) == 7 && (BDTtaka % 10) == 0) result = "Seventy";
if (BDTtaka > 20 && (BDTtaka / 10) == 8 && (BDTtaka % 10) == 0) result = "Eighty";
if (BDTtaka > 20 && (BDTtaka / 10) == 9 && (BDTtaka % 10) == 0) result = "Ninty";
if (BDTtaka > 20 && (BDTtaka / 10) == 2 && (BDTtaka % 10) != 0)
{
if ((BDTtaka % 10) == 0) result = "Twenty";
if ((BDTtaka % 10) == 1) result = "Twenty One";
if ((BDTtaka % 10) == 2) result = "Twenty Two";
if ((BDTtaka % 10) == 3) result = "Twenty Three";
if ((BDTtaka % 10) == 4) result = "Twenty Four";
if ((BDTtaka % 10) == 5) result = "Twenty Five";
if ((BDTtaka % 10) == 6) result = "Twenty Six";
if ((BDTtaka % 10) == 7) result = "Twenty Seven";
if ((BDTtaka % 10) == 8) result = "Twenty Eight";
if ((BDTtaka % 10) == 9) result = "Twenty Nine";
}
if (BDTtaka > 20 && (BDTtaka / 10) == 3 && (BDTtaka % 10) != 0)
{
if ((BDTtaka % 10) == 1) result = "Thirty One";
if ((BDTtaka % 10) == 2) result = "Thirty Two";
if ((BDTtaka % 10) == 3) result = "Thirty Three";
if ((BDTtaka % 10) == 4) result = "Thirty Four";
if ((BDTtaka % 10) == 5) result = "Thirty Five";
if ((BDTtaka % 10) == 6) result = "Thirty Six";
if ((BDTtaka % 10) == 7) result = "Thirty Seven";
if ((BDTtaka % 10) == 8) result = "Thirty Eight";
if ((BDTtaka % 10) == 9) result = "Thirty Nine";
}
if (BDTtaka > 20 && (BDTtaka / 10) == 4 && (BDTtaka % 10) != 0)
{
if ((BDTtaka % 10) == 1) result = "Forty One";
if ((BDTtaka % 10) == 2) result = "Forty Two";
if ((BDTtaka % 10) == 3) result = "Forty Three";
if ((BDTtaka % 10) == 4) result = "Forty Four";
if ((BDTtaka % 10) == 5) result = "Forty Five";
if ((BDTtaka % 10) == 6) result = "Forty Six";
if ((BDTtaka % 10) == 7) result = "Forty Seven";
if ((BDTtaka % 10) == 8) result = "Forty Eight";
if ((BDTtaka % 10) == 9) result = "Forty Nine";
}
if (BDTtaka > 20 && (BDTtaka / 10) == 5 && (BDTtaka % 10) != 0)
{
if ((BDTtaka % 10) == 1) result = "Fifty One";
if ((BDTtaka % 10) == 2) result = "Fifty Two";
if ((BDTtaka % 10) == 3) result = "Fifty Three";
if ((BDTtaka % 10) == 4) result = "Fifty Four";
if ((BDTtaka % 10) == 5) result = "Fifty Five";
if ((BDTtaka % 10) == 6) result = "Fifty Six";
if ((BDTtaka % 10) == 7) result = "Fifty Seven";
if ((BDTtaka % 10) == 8) result = "Fifty Eight";
if ((BDTtaka % 10) == 9) result = "Fifty Nine";
}
if (BDTtaka > 20 && (BDTtaka / 10) == 6 && (BDTtaka % 10) != 0)
{
if ((BDTtaka % 10) == 1) result = "Sixty One";
if ((BDTtaka % 10) == 2) result = "Sixty Two";
if ((BDTtaka % 10) == 3) result = "Sixty Three";
if ((BDTtaka % 10) == 4) result = "Sixty Four";
if ((BDTtaka % 10) == 5) result = "Sixty Five";
if ((BDTtaka % 10) == 6) result = "Sixty Six";
if ((BDTtaka % 10) == 7) result = "Sixty Seven";
if ((BDTtaka % 10) == 8) result = "Sixty Eight";
if ((BDTtaka % 10) == 9) result = "Sixty Nine";
}
if (BDTtaka > 20 && (BDTtaka / 10) == 7 && (BDTtaka % 10) != 0)
{
if ((BDTtaka % 10) == 1) result = "Seventy One";
if ((BDTtaka % 10) == 2) result = "Seventy Two";
if ((BDTtaka % 10) == 3) result = "Seventy Three";
if ((BDTtaka % 10) == 4) result = "Seventy Four";
if ((BDTtaka % 10) == 5) result = "Seventy Five";
if ((BDTtaka % 10) == 6) result = "Seventy Six";
if ((BDTtaka % 10) == 7) result = "Seventy Seven";
if ((BDTtaka % 10) == 8) result = "Seventy Eight";
if ((BDTtaka % 10) == 9) result = "Seventy Nine";
}
if (BDTtaka > 20 && (BDTtaka / 10) == 8 && (BDTtaka % 10) != 0)
{
if ((BDTtaka % 10) == 1) result = "Eighty One";
if ((BDTtaka % 10) == 2) result = "Eighty Two";
if ((BDTtaka % 10) == 3) result = "Eighty Three";
if ((BDTtaka % 10) == 4) result = "Eighty Four";
if ((BDTtaka % 10) == 5) result = "Eighty Five";
if ((BDTtaka % 10) == 6) result = "Eighty Six";
if ((BDTtaka % 10) == 7) result = "Eighty Seven";
if ((BDTtaka % 10) == 8) result = "Eighty Eight";
if ((BDTtaka % 10) == 9) result = "Eighty Nine";
}
if (BDTtaka > 20 && (BDTtaka / 10) == 9 && (BDTtaka % 10) != 0)
{
if ((BDTtaka % 10) == 1) result = "Ninty One";
if ((BDTtaka % 10) == 2) result = "Ninty Two";
if ((BDTtaka % 10) == 3) result = "Ninty Three";
if ((BDTtaka % 10) == 4) result = "Ninty Four";
if ((BDTtaka % 10) == 5) result = "Ninty Five";
if ((BDTtaka % 10) == 6) result = "Ninty Six";
if ((BDTtaka % 10) == 7) result = "Ninty Seven";
if ((BDTtaka % 10) == 8) result = "Ninty Eight";
if ((BDTtaka % 10) == 9) result = "Ninty Nine";
}
return result;
}
protected void Button1_Click(object sender, System.EventArgs e)
{
TextBox2.Text = BDTtaka(Convert.ToInt64(TextBox1.Text));
}
< /code>
Проблема: когда я вступаю в текст1, например, 20 или 20000 или 2000000, показываю только таку или только тысячу таку или только лака таку соответственно. Но должен показать двадцать или двадцать тысяч или двадцать лаков соответственно.
Подробнее здесь: [url]https://stackoverflow.com/questions/17352256/translation-of-bangladesh-currency-to-words[/url]
Ответить
1 сообщение
• Страница 1 из 1
Перейти
- Кемерово-IT
- ↳ Javascript
- ↳ C#
- ↳ JAVA
- ↳ Elasticsearch aggregation
- ↳ Python
- ↳ Php
- ↳ Android
- ↳ Html
- ↳ Jquery
- ↳ C++
- ↳ IOS
- ↳ CSS
- ↳ Excel
- ↳ Linux
- ↳ Apache
- ↳ MySql
- Детский мир
- Для души
- ↳ Музыкальные инструменты даром
- ↳ Печатная продукция даром
- Внешняя красота и здоровье
- ↳ Одежда и обувь для взрослых даром
- ↳ Товары для здоровья
- ↳ Физкультура и спорт
- Техника - даром!
- ↳ Автомобилистам
- ↳ Компьютерная техника
- ↳ Плиты: газовые и электрические
- ↳ Холодильники
- ↳ Стиральные машины
- ↳ Телевизоры
- ↳ Телефоны, смартфоны, плашеты
- ↳ Швейные машинки
- ↳ Прочая электроника и техника
- ↳ Фототехника
- Ремонт и интерьер
- ↳ Стройматериалы, инструмент
- ↳ Мебель и предметы интерьера даром
- ↳ Cантехника
- Другие темы
- ↳ Разное даром
- ↳ Давай меняться!
- ↳ Отдам\возьму за копеечку
- ↳ Работа и подработка в Кемерове
- ↳ Давай с тобой поговорим...
Мобильная версия