-2

Hey guys and girl i need your help in program only in C CODE user press only odd numbers then the following result has been shown like

if 3 then

***
* *
***

if 5 then
*****
* *
*****
* *
*****
PLZ HELP ME >>>> Thanks

5
Contributors
8
Replies
10
Views
6 Years
Discussion Span
Last Post by Salem
Featured Replies
  • 1
    Salem 5,138   6 Years Ago

    [url]http://www.daniweb.com/forums/announcement118-2.html[/url] [url]http://www.catb.org/~esr/faqs/smart-questions.html#urgent[/url] Read More

  • 1
    Salem 5,138   6 Years Ago

    There's a queue? That's mighty generous of you, I was just going with "ignore" ;) Read More

0

f 5 then

*****
*      *
*****
*      *
*****

PLZ HELP ME >>>> Thanks

remember in even column only 1st and last star will print not else there are spaces among them.

Edited by mike_2000_17: Fixed formatting

0

sorry, your question is not urgent.

and the fact that you have spammed it here multiple time, now just moved you to the very back of the queue.

1

There's a queue?

That's mighty generous of you, I was just going with "ignore" ;)

Comments
well, to be honest, it's the "ignore yo' ass" queue....
0

Seems like you could scanf() and get a number from the user

and then use a for loop to print out the lines of *'s, alternating between the user's number of *'s, and two *'s.

So every time your iterator in the loop is even, you want the user's number of *'s, and when the iterator is odd, you want just two *'s.

i % 2 == 0 is a very good test you might use, to see if the iterator i is even or not.

Give that a try and post up your code.

AND USE CODE TAGS AROUND YOUR CODE - ALWAYS

Edited by Adak: n/a

0

i need a solution if anyone have plz

Then write one yourself. Take the hints already given and start coding. Nobody here is going to write your program for you.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.