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.
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.

• 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.