![]() |
|
#1
|
|||
|
|||
ask loopingi have a problem bout looping so the output prog like this:
1 11 111 1111 * ** *** **** ***** * ** *** ** * i have problem to make a prog with algorithm and code-code,if u have any tips or from ur experience to create prog with quick ,pls share .thanks |
|
#2
|
|||
|
|||
|
Quote:
[edit]Post what you have worked on, and folks will improve on it from there. |
|
#3
|
||||
|
||||
|
Hmm how are we going to know the nature of the question you are asking ? and the problems you faced while doing the question?
__________________
People should read the rules and regulation before posting! The Best is yet to be... |
|
#4
|
|||
|
|||
|
i figure out the looping like this:
j=0 1 2 3 --------------- i=0 | 1 1 | 1 1 2 | 1 1 1 3 | 1 1 1 1 here is the code : CPP / C++ / C Code:
the output is : 1 i spend many time to find the design but it's hard to find the correct,can anyone help? |
|
#5
|
||||
|
||||
|
Quote:
Here's what I get when I run it: Quote:
Since I'm note sure what you're thoughts are I'm not sure what you're trying to accomplish in the code. My first suggestion is to put braces around your for statements. I'll comment what you've got and maybe you can see what you need to do, or ask about. CPP / C++ / C Code:
Then you have to decide how to tell if you need to output a '1', and empty string, or another character. I'd recommend outputting a '0' or '-' until you get the pattern right: 1--- 11-- 111- 1111 __________________
Cow: You're a lawyer too? Mooseblood (mosquito): Ma'am, I was already a bloodsucking parasite. All I needed was a briefcase! |
Recent GIDBlog
A Week in Kuwait by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| for looping prob | Rosmayati | C Programming Language | 1 | 30-Jun-2004 11:39 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The