Question:

I need a list of numbers up to 10,000 separated by a space and each one ends with .jpg?

by  |  earlier

0 LIKES UnLike

so its like

1.jpg

2.jpg

3.jpg

and so on, i'm not sure of any easy way to do this so if you know how can you do it

 Tags:

   Report

4 ANSWERS


  1. In C:

    char *s[10000];

    int i;

    for (i=0; i<10000; i++)

    s[i]=(char *)malloc(10); /* Up to 5 digits + ".jpg" + '\0' */

    sprintf(s[i], "%d.jpg", i+1);

    }


  2. Use Excel.

    If you don't have or can't afford, download OpenOffice -- it's free, and use its spreadsheet. (A useful thing to have in any case.)

    UPDATE:

    That is one dumb C program down below.

    This is all ya' need:

    #include <stdio.h>

    main()

    {

        for (i=1; i<=10000; i++)

            printf("%d.jpg\n",i);

    }

    But note that I don't think anyone with a C compiler who knows how to use it would need to ask such a question.

  3. If you have Excel, it's pretty easy and only takes a few minutes.

    In the first column, start numbering down 1, 2, 3, etc.  Use the FILL function to go all the way to 10,000.

    In the second column, type in .jpg and copy it all the way down that column.

    In the third column, use CONCATENATE to join Column 1 with Column 2.  Then copy and paste-values that column (otherwise you have a hard time moving it around.)

  4. Get crackin'

Question Stats

Latest activity: earlier.
This question has 4 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.
Unanswered Questions