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 7657647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T13:04:52+00:00 2026-05-31T13:04:52+00:00

I need to convert the user enter amount into words. For example, 1230.30 into

  • 0

I need to convert the user enter amount into words. For example, 1230.30 into one thousand two hundered and thirty rupees thirty paise.So,how to convert it?

  • 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-31T13:04:53+00:00Added an answer on May 31, 2026 at 1:04 pm
    public  string NumberToText(int number) 
    { 
        if (number == 0) return "Zero"; 
        if (number == -2147483648) return "Minus Two Hundred and Fourteen Crore Seventy Four Lakh Eighty Three Thousand Six Hundred and Forty Eight"; 
        int[] num = new int[4]; 
        int first = 0; 
        int u, h, t; 
        System.Text.StringBuilder sb = new System.Text.StringBuilder(); 
        if (number < 0) 
        { 
            sb.Append("Minus "); 
            number = -number; 
        } 
        string[] words0 = {"" ,"One ", "Two ", "Three ", "Four ", 
        "Five " ,"Six ", "Seven ", "Eight ", "Nine "}; 
        string[] words1 = {"Ten ", "Eleven ", "Twelve ", "Thirteen ", "Fourteen ", 
        "Fifteen ","Sixteen ","Seventeen ","Eighteen ", "Nineteen "}; 
        string[] words2 = {"Twenty ", "Thirty ", "Forty ", "Fifty ", "Sixty ", 
        "Seventy ","Eighty ", "Ninety "}; 
        string[] words3 = {"Thousand ", "Lakh ","Crore "}; 
        num[0] = number % 1000; // units 
        num[1] = number / 1000; 
        num[2] = number / 100000; 
        num[1] = num[1] - 100 * num[2]; // thousands 
        num[3] = number / 10000000; // crores 
        num[2] = num[2] - 100 * num[3]; // lakhs 
        for(int i = 3; i > 0 ; i--) 
        { 
            if (num[i] != 0) 
            { 
                first = i; 
                break; 
            } 
        } 
        for(int i = first ; i >= 0 ; i--) 
        { 
            if (num[i] == 0) continue; 
            u = num[i] % 10; // ones 
            t = num[i] / 10; 
            h = num[i] / 100; // hundreds 
            t = t - 10 * h; // tens 
            if (h > 0) sb.Append(words0[h] + "Hundred "); 
            if (u > 0 || t > 0) 
            { 
                if (h > 0 || i == 0) sb.Append("and "); 
                if (t == 0) 
                sb.Append(words0[u]); 
                else if (t == 1) 
                sb.Append(words1[u]); 
                else 
                sb.Append(words2[t-2] + words0[u]); 
            } 
            if (i != 0) sb.Append(words3[i-1]); 
        } 
        return sb.ToString().TrimEnd(); 
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to convert an arbitrary amount of milliseconds into Days, Hours, Minutes Second.
i need to convert this HQL: FROM Appointment a WHERE (a.group==null OR :user MEMBER
I need to convert latitude/longitude coordinates into Easting/Northing coordinates in the Alberta 10 TM
I need to convert HTML documents into valid XML, preferably XHTML. What's the best
I need to convert a value which is in a DateTime variable into a
I need to convert a Word document into HTML file(s) in Java. The function
I am having the user enter the date and the time. I need to
I need a way in c# or javascript to convert any input user has
In my iPhone app I need the user to be able to enter a
I need to convert user db id or username (or whatever else is unique

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.