Page 2 of 5 FirstFirst 1234 ... LastLast
Results 11 to 20 of 41
  1. #11
    Elite Member
    Join Date
    Aug 2008
    Posts
    1,053
    Blog Entries
    1

    Quote Originally Posted by silent-kill View Post
    first you need to store:

    array1 = one, two, three, four, five, six, seven, eight, nine, zero
    array2 = ten, eleven, twelve, thirteen, fourteen, fifteen, sixteen, seventeen, eighteen, nineteen,
    array3 = ten, twenty, thirty, fourty, fifty, sixty, eighty, ninety,
    array4 = hundred
    array5 = thousand
    no need array4 and array5.

    PHP Code:
    seven hundred ninety two 
    seven hundred ninety four 
    seven hundred ninety six 
    seven hundred ninety eight 
    eight hundred 
    eight hundred two 
    eight hundred four 
    eight hundred six 
    eight hundred eight 
    eight hundred ten 
    eight hundred twelve 
    eight hundred fourteen 
    eight hundred sixteen 
    eight hundred eighteen 
    eight hundred twenty 
    eight hundred twenty two 
    eight hundred twenty four 
    eight hundred twenty six 
    eight hundred twenty eight 
    eight hundred thirty 
    PHP Code:
    one thousand four hundred thirty six 
    one thousand four hundred thirty eight 
    one thousand four hundred forty 
    one thousand four hundred forty two 
    one thousand four hundred forty four 
    one thousand four hundred forty six 
    one thousand four hundred forty eight 
    one thousand four hundred fifty 
    one thousand four hundred fifty two 
    one thousand four hundred fifty four 
    one thousand four hundred fifty six 
    one thousand four hundred fifty eight 
    one thousand four hundred sixty 
    one thousand four hundred sixty two 
    I hope you get what I mean, on my output.
    for future, you need million, billion, trillion........................................to whatever lion is that


    this is how I solve it"
    -get input
    -divide your input to extract ones, tens, hundreds and thousands.
    -use switch/if then else to
    -ones, tens, hundreds, and thousands
    -and convert them to string equivalent.
    -concatenate each string
    -output concatenated string
    I suggest to convert it to string directly or group your digits by three, so you will have a better performance when talking about large numbers.

  2. #12
    simple na lang... first

    magbuhat na lang ka ug pila ka DIGIT ang imong iAccept


    if for example 3
    then mag loop na lang ka para input sa 3 ka digits

    then kato imo input iadto sa Array para sa imong Digits

    then from ur array sa Digits


    buhat ka ug condition based na pod sa string arrays nimo para sa Ones, Tens, Hundreds, Thousands....



    i know nga pag makasabot ka sa Concept... kanang syntax sa program makabuhat na ka ana bro!!!


    hehehe



    Gamit daan ug Flowchart

    nya codes dayon sa papel

    then gikan sa codes sa papel

    apply dayon sa C++


    Dnt start sa Compiler to Paper then to Flowchart....

    dapat Flowchart - Paper (Codings) - Apply to Compiler......


    (Practice makes perfect but only from our mistakes we learn our lessons.......)


    and lastly


    Imagination is much important than knowledge coz knowledge is limited but imagination incircles the world.... -a. einstien

  3. #13
    Elite Member
    Join Date
    Aug 2008
    Gender
    Male
    Posts
    1,422
    Blog Entries
    1
    tnx mga bro,..upto ninety ra man gud akong makuha


    #include<string.h>
    #include<conio.h>
    #include<stdio.h>
    char*getName(int num)
    {

  4. #14
    bordogoy: i.post kuno tanan nmo code, i.check na2 ug asa ang imong kulang....

  5. #15
    Elite Member
    Join Date
    Aug 2008
    Posts
    1,053
    Blog Entries
    1
    yup...much better....

  6. #16
    Elite Member
    Join Date
    Aug 2008
    Gender
    Male
    Posts
    1,422
    Blog Entries
    1
    #include<string.h>
    #include<conio.h>
    #include<stdio.h>
    char*getName(int num)
    {
    char word[25];
    switch (num)
    {
    case 1:strcpy(word,"one");break;
    case 2:strcpy(word,"two");break;
    case 3:strcpy(word,"three");break;
    case 4:strcpy(word,"four");break;
    case 5:strcpy(word,"five");break;
    case 6:strcpy(word,"six");break;
    case 7:strcpy(word,"seven");break;
    case 8:strcpy(word,"eight");break;
    case 9:strcpy(word,"nine");break;
    case 10:strcpy(word,"ten");break;
    case 11:strcpy(word,"eleven");break;
    .
    .
    .
    .
    .
    .
    case 65535:strcpy(word,"sixty five thousand five hundred thirty five");break;
    }
    return word;
    }
    void main()
    {
    int num=0;
    clrscr();
    scanf("%d",&num);
    printf(getName(num));
    getch();
    }

    this is my code.. my problem is how can i directly go to 65535 without following all of the numbers from 1-65535...

    pliss help me ASAP...

  7. #17
    using pointers

    oist.... e paste daw bro.. para pod naa tay makat-unan...


    =)

  8. #18
    murag sak2 jud ni silent-kill ani dah.

    bro, nakasabot ka sa akong gi.post sa page 1? try to analyze ato kay ato ang pinaka simple nga solution, without using array and function.

    i.try nako ug post ang 1-99 nga solution then ikaw na tiwas sa rest para pud naa kay makat.unan. Ako sa tong pangitaon ha...kay dugay na kaayo to ngako gi.archive....

  9. #19
    Elite Member
    Join Date
    Aug 2008
    Gender
    Male
    Posts
    1,422
    Blog Entries
    1
    thanks kaayo mga bro...help nalang mo bro kay up to 90 ra man gud ko kutob..ang gihatag sa among maestro kay up 65535 man..help bro ASAP..

  10. #20
    Elite Member
    Join Date
    Aug 2008
    Gender
    Male
    Posts
    1,422
    Blog Entries
    1
    thanks kaayo mga bro...help nalang mo bro kay up to 90 ra man gud ko kutob..ang gihatag sa among maestro kay up 65535 man..help bro ASAP..

  11.    Advertisement

Page 2 of 5 FirstFirst 1234 ... LastLast

Similar Threads

 
  1. help me..!!!
    By hot_chick in forum "Love is..."
    Replies: 53
    Last Post: 07-13-2011, 03:21 PM
  2. Replies: 4
    Last Post: 12-26-2007, 02:03 PM
  3. Help me pangita sa PORK Barrel gihatag sa Goberno ngadtu....
    By dmcebu in forum Politics & Current Events
    Replies: 12
    Last Post: 06-06-2006, 02:02 PM
  4. Help Me I Cant Log In
    By mark eugene in forum Support Center
    Replies: 12
    Last Post: 06-06-2005, 02:35 PM
  5. hey help me
    By roselyn in forum Support Center
    Replies: 2
    Last Post: 04-23-2005, 04:59 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top