Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3432140
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T07:24:44+00:00 2026-05-18T07:24:44+00:00

I m Trying to convert a number entered in the text box post.But I

  • 0

I m Trying to convert a number entered in the text box post.But I can not find the right reasons, does not work.Are you also please have a look.Thank you in advance!

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace NumberToText
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        public void NumberControl()
        {
            if ((txtNumber.Text.Length>7))
            {
                MessageBox.Show("Please enter a smaller number");
            }
        }
        public void ReadNumber()
        {


            try
            {
                int ones, tens, hundreds, thousands, tenthousands, hundredthousands, 

millions;
                int number = Convert.ToInt32(txtNumber.Text);

                int[] array=new int[7];



                for (int j = 0; j < txtNumber.Text.Length; )  
                {

                    array[j] = (number / (10 ^ (txtNumber.Text.Length - 

(txtNumber.Text.Length - j)))) % 10;
                    j += 1;
                }
                if (txtSayi.Text.Length != 7) 
                {
                    for (int i = 6; i >= txtNumber.Text.Length; )
                    {
                        dizi[i] = 0;
                        i-=1;
                    }
                }

                  ones = array[0];
                  tens = array[1];
                  hundreds = array[2];
                  thousands = array[3];
                  tenthousands = array[4];
                  hundredthousands = array[5];
                  millions = array[6];

                //Converting to numbers in TURKISH Text

                string[] a_ones = { "", "Bir", "İki", "Üç", "Dört", "Beş", "Altı", 

"Yedi", "Sekiz", "Dokuz" };
                string[] a_tens = { "", "On", "Yirmi", "Otuz", "Kırk", "Elli", 

"Altmış", "Yetmiş", "Seksen", "Doksan" };
                string[] a_hundreds = { "", "Yüz", "İkiyüz", "Üçyüz", "Dörtyüz", 

"Beşyüz", "Altıyüz", "Yediyüz", "Sekizyüz", "Dokuzyüz" };
                string[] a_thousands = { "", "Bin", "İkibin", "Üçbin", "Dörtbin", 

"Beşbin", "Altıbin", "Yedibin", "Sekizbin", "Dokuzbin" };
                string[] a_tenthousands = { "", "On", "Yirmi", "Otuz", "Kırk", 

"Elli", "Altmış", "Yetmiş", "Seksen", "Doksan" };
                string[] a_hundredthousands = { "", "Yüz", "İkiyüz", "Üçyüz", 

"Dörtyüz", "Beşyüz", "Altıyüz", "Yediyüz", "Sekizyüz", "Dokuzyüz" };
                string[] a_millions = { "", "Birmilyon", "İkimilyon", "Üçmilyon", 

"Dörtmilyon", "Beşmilyon", "Altımilyon", "Yedimilyon", "Sekizmilyon", "Dokuzmilyon" 

};

                lblText.Text = a_millions[millions] + " " + a_hundredthousands

[hundredthousands] + a_tenthousands[tenthousands] + " " + a_thousands[thousands] + "  

" + a_hundreds[hundreds] + " " + a_tens[tens] + " " + a_ones[ones];

            } 
            catch (Exception ex)
            {

                MessageBox.Show(ex.Message.ToString());
            }
        }




        private void btnConvert_Click(object sender, EventArgs e)
        {
            NumberControl();
            ReadNumber();

        }

    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T07:24:45+00:00Added an answer on May 18, 2026 at 7:24 am
    for (int j = 0; j < txtNumber.Text.Length; )  
    {
        array[j] = (number / (10 ^ (txtNumber.Text.Length - (txtNumber.Text.Length - j)))) % 10;
        j += 1;
    }
    

    (txtNumber.Text.Length - (txtNumber.Text.Length - j)) is j, so:

    for (int j = 0; j < txtNumber.Text.Length; j += 1)  
    {
        array[j] = (number / (10 ^ j)) % 10;
    }
    

    You’re XOR’ing 10 with j?

    Also, “Sekizmilyon” is not a word. You need a put a space in between.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to convert the following but am having difficulty. Can anyone see where I'm
I am trying to convert string month name to month number, but why do
I'm trying to figure out how I can convert a number between 1 and
I'm trying to convert a floating point number to binary representation; how can I
I'm trying to convert a large number of files from a plain text layout
I'm trying to convert the following text to a decimal number in excel 2003:
I'm trying to convert a string from iso-8859-1 to utf-8. But when I find
I am trying to convert big integer number to hexadecimal, but in result I
I'm trying to convert a single precision floating point number into an ascii representation
I'm trying to use std::ostringstream to convert a number into a string (char *),

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.