Thread: anyone i need help how to delete number when we generate 1000 using array..

  1. #1
    Registered User
    Join Date
    May 2012
    Posts
    2

    Unhappy anyone i need help how to delete number when we generate 1000 using array..

    this is my code c programming;
    Code:
    #include<stdio.h>
    #include<stdlib.h>
    int cubebyvalue(int);
     
    int main(){
    
    
    int a;
    char num[10]={'0','1','2','3','4','5','6','7','8','9'};
    //char *ptr;
    char ch[14];
    
    
    for(int i=0; i<10; i++){
    for(int i=0; i<14; i++)
    
    
    {
    ch[i] = num[rand()%9];
    }
    for (int i=0; i<14; i++){
        printf("%c", ch[i]);
    
    
    }
    
    
    printf("\n\n");
    
    
    
    
    }
    return 0;
    }

  2. #2
    Registered User antred's Avatar
    Join Date
    Apr 2012
    Location
    Germany
    Posts
    257
    Please try to express yourself more clearly. I don't understand what you're asking. What are you trying to delete?

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    SourceForge.net: Indentation - cpwiki
    "left" is not an indentation style. Your code is unreadable.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  4. #4
    Algorithm Dissector iMalc's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    6,318
    So you have badly written code that generates a reproduceable list of 140 numbers between zero and eight.

    What's your question?
    My homepage
    Advice: Take only as directed - If symptoms persist, please see your debugger

    Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"

  5. #5
    Registered User
    Join Date
    May 2012
    Posts
    2
    Quote Originally Posted by iMalc View Post
    So you have badly written code that generates a reproduceable list of 140 numbers between zero and eight.

    What's your question?
    owh sorry cause note ask in detail....
    actually when run this code it will show like this:

    58748130728276

    75783006504765


    85202064817326


    23623721551637


    23744256014544


    50567536320501


    05758163212183


    68024363022388


    51662336168688


    34818737713576


    Press any key to continue . . .
    output like this...
    then i want to delete 05758163212183
    after that it will update all the output and number which i delete will not display...how can i make that.??

  6. #6
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    5,108
    O_o

    If you are having this much trouble expressing yourself in English your best bet is to find a forum that "speaks" your native language.

    Soma

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. generate number
    By cheeta in forum C Programming
    Replies: 9
    Last Post: 05-03-2010, 07:49 AM
  2. Generate Random Number
    By peacealida in forum C++ Programming
    Replies: 10
    Last Post: 04-06-2008, 08:57 AM
  3. To generate bar code from a number
    By darkducke in forum C Programming
    Replies: 18
    Last Post: 01-16-2008, 06:33 AM
  4. generate a random number
    By waxydock in forum C++ Programming
    Replies: 5
    Last Post: 06-05-2005, 07:43 PM
  5. Ask about generate Random number
    By ooosawaddee3 in forum C Programming
    Replies: 2
    Last Post: 07-01-2002, 04:30 AM