### Thread: Need help

1. No Profile Picture
Registered User
Devshed Newbie (0 - 499 posts)

Join Date
Apr 2012
Posts
5
Rep Power
0

#### Need help

Writd a prog. to input any no. & find d combinations of the digits.
2. Read THIS FIRST before making demands for other people to do your homework.

Our "help" is in direct proportion to your "effort".
The more you put in, the more likely we are to help you.

Since your effort is zero - well, I guess you know what the answer is.
3. I just looked at all threads started by you.
Programming is not your strength.
Find a different career. Sorry.

By the way, it doesn't seem to be the right career for me since I'm jobless but have been programming since 1975.

#### Comments on this post

• ptr2void agrees : I just want to say this so damn often! Bravo!
4. I'm in a charitable mood tonight, so here you go:
Code:
```#include <stdio.h>

typedef struct {
int ch;
int count;
} star_t;

int main(void) {
star_t foo[] = {
{32, 4}, {95, 8}, {32, 3}, {95, 2}, {32, 4}, {95, 2}, {32, 4}, {95, 7}, {32, 3}, {95, 2}, {32, 4}, {95, 2}, {'\n', 1},
{32, 3}, {124, 1}, {9, 1}, {32, 4}, {124, 1}, {32, 1}, {124, 1}, {32, 2}, {124, 1}, {32, 2}, {124, 1}, {32, 2}, {124, 1}, {32, 2}, {47, 1}, {9, 1}, {32, 2}, {124, 1}, {32, 1}, {124, 1}, {32, 2}, {124, 1}, {32, 2}, {47, 1}, {32, 2}, {47, 1}, {'\n', 1},
{32, 3}, {124, 1}, {32, 2}, {45, 6}, {39, 1}, {32, 1}, {124, 1}, {32, 2}, {124, 1}, {32, 2}, {124, 1}, {32, 2}, {124, 1}, {32, 2}, {124, 1}, {32, 3}, {95, 4}, {124, 1}, {32, 1}, {124, 1}, {32, 2}, {124, 1}, {32, 1}, {47, 1}, {32, 2}, {47, 1}, {'\n', 1},
{32, 3}, {124, 1}, {32, 2}, {124, 1}, {95, 3}, {32, 4}, {124, 1}, {32, 2}, {124, 1}, {32, 2}, {124, 1}, {32, 2}, {124, 1}, {32, 2}, {124, 1}, {32, 2}, {124, 1}, {9, 1}, {32, 4}, {124, 1}, {32, 2}, {124, 1}, {47, 1}, {32, 2}, {47, 1}, {'\n', 1},
{32, 3}, {124, 1}, {32, 3}, {95, 3}, {124, 1}, {32, 3}, {124, 1}, {32, 2}, {124, 1}, {32, 2}, {124, 1}, {32, 2}, {124, 1}, {32, 2}, {124, 1}, {32, 2}, {124, 1}, {9, 1}, {32, 4}, {124, 1}, {9, 1}, {32, 2}, {47, 1}, {'\n', 1},
{32, 3}, {124, 1}, {32, 2}, {124, 1}, {32, 7}, {124, 1}, {32, 2}, {124, 1}, {32, 2}, {124, 1}, {32, 2}, {124, 1}, {32, 2}, {124, 1}, {32, 2}, {124, 1}, {95, 4}, {32, 2}, {124, 1}, {9, 1}, {32, 2}, {92, 1}, {'\n', 1},
{32, 3}, {124, 1}, {32, 2}, {124, 1}, {32, 7}, {124, 1}, {32, 3}, {45, 2}, {32, 3}, {124, 1}, {32, 2}, {124, 1}, {9, 1}, {32, 2}, {124, 1}, {32, 1}, {124, 1}, {32, 2}, {124, 1}, {92, 1}, {32, 2}, {92, 1}, {'\n', 1},
{32, 3}, {124, 1}, {95, 2}, {124, 1}, {32, 7}, {92, 1}, {95, 8}, {47, 1}, {32, 3}, {92, 1}, {95, 6}, {124, 1}, {32, 1}, {124, 1}, {95, 2}, {124, 1}, {32, 1}, {92, 1}, {95, 2}, {92, 1}, {'\n', 1},
{'\n', 1},
{9, 4}, {32, 5}, {95, 5}, {'\n', 1},
{9, 4}, {32, 4}, {124, 2}, {9, 1}, {32, 1}, {124, 2}, {'\n', 1},
{9, 4}, {32, 4}, {124, 1}, {92, 1}, {95, 3}, {47, 1}, {124, 1}, {'\n', 1},
{9, 4}, {32, 4}, {124, 1}, {9, 1}, {32, 2}, {124, 1}, {'\n', 1},
{9, 4}, {32, 4}, {124, 1}, {9, 1}, {32, 2}, {124, 1}, {'\n', 1},
{9, 4}, {32, 4}, {124, 1}, {9, 1}, {32, 2}, {124, 1}, {'\n', 1},
{9, 4}, {32, 4}, {124, 1}, {9, 1}, {32, 2}, {124, 1}, {'\n', 1},
{9, 4}, {32, 4}, {124, 1}, {9, 1}, {32, 2}, {124, 1}, {'\n', 1},
{9, 4}, {32, 4}, {124, 1}, {9, 1}, {32, 2}, {124, 1}, {'\n', 1},
{9, 3}, {32, 7}, {95, 5}, {124, 1}, {60, 1}, {45, 3}, {62, 1}, {124, 1}, {95, 5}, {'\n', 1},
{9, 3}, {32, 6}, {47, 1}, {32, 5}, {124, 1}, {9, 1}, {32, 2}, {124, 1}, {9, 1}, {92, 1}, {'\n', 1},
{9, 3}, {32, 1}, {47, 1}, {32, 4}, {124, 1}, {32, 5}, {124, 1}, {9, 1}, {32, 2}, {124, 1}, {9, 1}, {124, 1}, {32, 1}, {92, 1}, {'\n', 1},
{9, 3}, {32, 1}, {124, 1}, {32, 4}, {124, 1}, {32, 5}, {124, 1}, {9, 1}, {32, 2}, {124, 1}, {9, 1}, {124, 1}, {32, 2}, {124, 1}, {'\n', 1},
{9, 3}, {32, 1}, {124, 1}, {32, 4}, {124, 1}, {32, 5}, {124, 1}, {9, 1}, {32, 2}, {124, 1}, {9, 1}, {124, 1}, {32, 2}, {124, 1}, {'\n', 1},
{9, 3}, {32, 1}, {124, 1}, {9, 3}, {124, 1}, {32, 2}, {124, 1}, {'\n', 1},
{9, 3}, {32, 1}, {124, 1}, {9, 3}, {124, 1}, {32, 2}, {124, 1}, {'\n', 1},
{9, 3}, {32, 1}, {124, 1}, {9, 3}, {32, 2}, {47, 1}, {'\n', 1},
{9, 3}, {32, 1}, {124, 1}, {9, 3}, {32, 1}, {47, 1}, {'\n', 1},
{9, 3}, {32, 2}, {92, 1}, {9, 2}, {32, 7}, {47, 1}, {'\n', 1},
{9, 3}, {32, 3}, {92, 1}, {9, 2}, {32, 6}, {47, 1}, {'\n', 1},
{9, 3}, {32, 4}, {124, 1}, {9, 2}, {32, 6}, {124, 1}, {'\n', 1},
{9, 3}, {32, 4}, {124, 1}, {9, 2}, {32, 6}, {124, 1}, {'\n', 1},
{'\n', 1},
{9, 4}, {32, 5}, {95, 4}, {32, 5}, {95, 4}, {32, 2}, {95, 9}, {9, 1}, {95, 3}, {9, 1}, {95, 3}, {'\n', 1},
{9, 4}, {32, 5}, {92, 1}, {9, 1}, {32, 1}, {92, 1}, {32, 3}, {47, 1}, {9, 1}, {32, 1}, {47, 1}, {32, 1}, {47, 1}, {9, 1}, {32, 5}, {92, 1}, {32, 1}, {124, 1}, {32, 3}, {124, 1}, {32, 3}, {124, 1}, {32, 3}, {124, 1}, {'\n', 1},
{9, 4}, {32, 6}, {92, 1}, {32, 3}, {92, 1}, {32, 1}, {47, 1}, {9, 1}, {47, 1}, {32, 2}, {124, 1}, {32, 2}, {95, 5}, {32, 2}, {124, 1}, {32, 1}, {124, 1}, {32, 3}, {124, 1}, {32, 3}, {124, 1}, {32, 3}, {124, 1}, {'\n', 1},
{9, 4}, {32, 7}, {92, 1}, {32, 7}, {47, 1}, {32, 3}, {124, 1}, {32, 1}, {124, 1}, {9, 1}, {32, 3}, {124, 1}, {32, 1}, {124, 1}, {32, 1}, {124, 1}, {32, 3}, {124, 1}, {32, 3}, {124, 1}, {32, 3}, {124, 1}, {'\n', 1},
{9, 5}, {92, 1}, {32, 5}, {47, 1}, {32, 4}, {124, 1}, {32, 1}, {124, 1}, {9, 1}, {32, 3}, {124, 1}, {32, 1}, {124, 1}, {32, 1}, {124, 1}, {32, 3}, {124, 1}, {32, 3}, {124, 1}, {32, 3}, {124, 1}, {'\n', 1},
{9, 5}, {32, 1}, {124, 1}, {32, 3}, {124, 1}, {9, 1}, {32, 3}, {124, 1}, {32, 1}, {124, 1}, {9, 1}, {32, 3}, {124, 1}, {32, 1}, {124, 1}, {32, 1}, {124, 1}, {32, 3}, {124, 1}, {32, 3}, {124, 1}, {32, 3}, {124, 1}, {'\n', 1},
{9, 5}, {32, 1}, {124, 1}, {32, 3}, {124, 1}, {9, 1}, {32, 3}, {124, 1}, {32, 1}, {124, 1}, {95, 5}, {124, 1}, {32, 1}, {124, 1}, {32, 1}, {124, 1}, {32, 3}, {124, 1}, {95, 3}, {124, 1}, {32, 3}, {124, 1}, {'\n', 1},
{9, 5}, {32, 1}, {124, 1}, {32, 3}, {124, 1}, {9, 1}, {32, 3}, {124, 1}, {9, 1}, {32, 5}, {124, 1}, {32, 1}, {124, 1}, {9, 1}, {32, 3}, {124, 1}, {'\n', 1},
{9, 5}, {32, 1}, {124, 1}, {95, 3}, {124, 1}, {9, 1}, {32, 3}, {92, 1}, {95, 9}, {47, 1}, {32, 1}, {92, 1}, {95, 11}, {47, 1}, {'\n', 1},

};
int i, j;
for (i = 0; i < sizeof(foo) / sizeof(foo[0]); i++) {
star_t bar = foo[i];
for (j = 0; j < bar.count; j++) {
printf("%c", (char)bar.ch);
}
}
return 0;
}```
Enjoy.

#### Comments on this post

• dwise1_aol agrees : Cool Program! I've been wanting to get the source code for a long time now!
5. If we had a nickel for every request that we do their homework for them, we wouldn't need all these annoying adverts.
6. dwise: I'm glad you like the program sir. I actually wrote a program in perl that generates the necessary C code from an ASCII art text file. Please let me know if you want the source code for that.
7. Though what I really liked about it was what happened the last time you gave it to someone wanting us to do his homework for him: he turned it in as his own work and the first time he ever saw it run was when his instructor ran it. And the fool had the nerve to come back and express his anger to you.

Even more classic than when two others in the same class who were found out when their instructor visited our forum.

Gotta love it when a plan comes together.
Last edited by dwise1_aol; April 18th, 2012 at 02:26 PM.