C Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesC Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 14th, 2012, 11:31 AM
phoenix5000 phoenix5000 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2012
Posts: 5 phoenix5000 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 10 m 17 sec
Reputation Power: 0
Need help

Writd a prog. to input any no. & find d combinations of the digits.

Reply With Quote
  #2  
Old April 14th, 2012, 12:40 PM
salem's Avatar
salem salem is offline
Contributed User
Click here for more information
 
Join Date: Jun 2005
Posts: 3,836 salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)  Folding Points: 153 Folding Title: Novice Folder
Time spent in forums: 2 Months 3 Weeks 2 Days 16 h 15 m 5 sec
Reputation Power: 1774
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.
__________________
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

Reply With Quote
  #3  
Old April 14th, 2012, 03:01 PM
b49P23TIvg's Avatar
b49P23TIvg b49P23TIvg is offline
Contributing User
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Aug 2011
Posts: 3,354 b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 1 Month 2 Weeks 3 Days 8 h 21 m 53 sec
Reputation Power: 383
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!
__________________
[code]Code tags[/code] are essential for python code!

Reply With Quote
  #4  
Old April 17th, 2012, 08:08 PM
Scorpions4ever's Avatar
Scorpions4ever Scorpions4ever is offline
Banned ;)
Dev Shed God 9th Plane (9000 - 9499 posts)
 
Join Date: Nov 2001
Location: Woodland Hills, Los Angeles County, California, USA
Posts: 9,383 Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 4 Weeks 1 Day 20 h 49 m 30 sec
Reputation Power: 4080
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!
__________________
Up the Irons
What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
"Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
Down with Sharon Osbourne

Reply With Quote
  #5  
Old April 17th, 2012, 08:38 PM
dwise1_aol's Avatar
dwise1_aol dwise1_aol is offline
Contributing User
Dev Shed God 2nd Plane (6000 - 6499 posts)
 
Join Date: Jan 2003
Location: USA
Posts: 6,125 dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level) 
Time spent in forums: 2 Months 2 Weeks 3 Days 16 h 57 m 4 sec
Reputation Power: 1949
If we had a nickel for every request that we do their homework for them, we wouldn't need all these annoying adverts.

Reply With Quote
  #6  
Old April 18th, 2012, 12:55 PM
Scorpions4ever's Avatar
Scorpions4ever Scorpions4ever is offline
Banned ;)
Dev Shed God 9th Plane (9000 - 9499 posts)
 
Join Date: Nov 2001
Location: Woodland Hills, Los Angeles County, California, USA
Posts: 9,383 Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 4 Weeks 1 Day 20 h 49 m 30 sec
Reputation Power: 4080
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.

Reply With Quote
  #7  
Old April 18th, 2012, 02:23 PM
dwise1_aol's Avatar
dwise1_aol dwise1_aol is offline
Contributing User
Dev Shed God 2nd Plane (6000 - 6499 posts)
 
Join Date: Jan 2003
Location: USA
Posts: 6,125 dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level) 
Time spent in forums: 2 Months 2 Weeks 3 Days 16 h 57 m 4 sec
Reputation Power: 1949
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesC Programming > Need help

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap