Hi Friends,
How to generate dynamically the output
*
* *
* * *
* *
*
without giving the constant number as (3 max).
Suppose if we give it as 4 it should give o/p as
*
* *
* * *
* * * *
* * *
* *
*
5 1066
Hi Friends,
How to generate dynamically the output
*
* *
* * *
* *
*
without giving the constant number as (3 max).
Suppose if we give it as 4 it should give o/p as
*
* *
* * *
* * * *
* * *
* *
*
Now that is very simple to produce. Write it and see. Just put together your algorithm. You can use + to add two Strings together and the substring method can be used to chop off character(s) from a string ....
Hi Friends,
How to generate dynamically the output -
-------
-
-
*
-
* *
-
* * *
-
* *
-
*
-
without giving the constant number as (3 max).
I put a few code tags around your little picture and it turned out to be an
entirely different picture. Just for the record ...
kind regards,
Jos
Hi Friends,
How to generate dynamically the output
...
Here's a hint: - n = 3, lines = 5
-
-
* starting spaces = 2, stars = 1
-
* * starting spaces = 1, stars = 2
-
* * * starting spaces = 0, stars = 3
-
* * starting spaces = 1, stars = 2
-
* starting spaces = 2, stars = 1
-
-
-
n = 4, lines = 7
-
-
* starting spaces = 3, stars = 1
-
* * starting spaces = 2, stars = 2
-
* * * starting spaces = 1, stars = 3
-
* * * * starting spaces = 0, stars = 4
-
* * * starting spaces = 1, stars = 3
-
* * starting spaces = 2, stars = 2
-
* starting spaces = 3, stars = 1
I put a few code tags around your little picture and it turned out to be an
entirely different picture. Just for the record ...
kind regards,
Jos
Wow, now what made you think of that? The OP also didn't bother checking their own post too ....
Wow, now what made you think of that? The OP also didn't bother checking their own post too ....
My thoughts were: "sloppy". When a poster doesn't care to go through the
"trouble" to make his/her question clear and not mislead his/her reading audience,
IMHO the question is not worth to be answered. I'm not talking about the level
of command of the English language. This may seem arrogant, but imagine
people give hints about how to create such a "triangle"; it would end up being
a complete mess and misunderstanding between the OP and his/her reading
audience; not something we, nor anybody else, want.
kind regards,
Jos
Sign in to post your reply or Sign up for a free account.
Similar topics
by: santanu |
last post by:
Hi all,
I know a little python (not the OOP part) learnt by studying the online
tutorial. Now I would like to learn it more thoroughly.
I have access to 'Programming Python' which I liked...
|
by: srinivas |
last post by:
HI,
I am a dotnet developer.Ho we can do the functionality exists in
google suggest site
(http://www.google.com/webhp?complete=1&hl=en).In this site in search
text box if we enter some text it...
|
by: guoqi zheng |
last post by:
On this link
http://www.google.com/webhp?complete=1
when you are typing a word, google will get the suggest outcome immediately,
any idea how can they do this?
There is a onchange event on...
|
by: rAinDeEr |
last post by:
Hi,
I have a table with the following 2 Fields - one is the description
name and the second is its description to be stored in a table.
description name description...
|
by: awebguynow |
last post by:
It seems like I've been reading the code to Google Suggest (GS) for
about a week, and I'm going to have to wrap it up shortly.
I'm OK with many of the subjects, and I would say I have...
|
by: ashutosh |
last post by:
I am working for a company and working for printer drivers. Most of the
work is in ddk, VC++ and C++, gdi calls. I have studied C++ and ddk and
VC++ is new for me. Can anybody suggest me some good...
|
by: Thierry Lam |
last post by:
I implemented the autocomplete/suggest for a text input, however the
suggest div table does not overlap the other widgets underneath my text
input. All it does is create space between my text input...
|
by: only2gayathri |
last post by:
Hi all,
I have a page(vb.net) which directs to a excel sheet.This excel sheet
retains all the values(mainly numbers) from the page and displays
it.The problem is that sometimes the number's...
|
by: natkw1 |
last post by:
Hi all,
I'm new to C and kind of confused on this.
I've had a look around this group for suggestions but still not sure
why the warning is occurring.
What I've done is this
<code snip>
void...
|
by: muddasirmunir |
last post by:
Well i want to make a simple website , for which i need some suggestion from you people.
I have good idea about front page to make website but the tool not looking great so please suggest me some...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |