LebGeeks

A community for technology geeks in Lebanon.

You are not logged in.

#1 November 2 2015

Jay
Member

Programming help

Hello , I have been trying for days to solve my programming assignment and could not succeed . We should use while loops . The user should put the radius and we should generate a circle made of stars   " * " having this radius . Can you help me asap ..  PS: this assignment is a java one not a C++ .

Last edited by Jay (November 2 2015)

Offline

#2 November 2 2015

rtp
Member

Re: Programming help

you can do it!

hmm lets see:
- take user input / 2 and multiply it by negative
- set the input/2 into a variable and increment it on each loop
- loop while its is less than radius/2
- while its is negative you are drawing the upper part, when its 0 you on in the center and after that you should start drawing the lower part.

set a counter to know how many stars you should draw, you start by 1 at the top and then 2,3 etc...

am not sure if this is work, but better than nothing...

Last edited by rtp (November 3 2015)

Offline

#3 November 3 2015

Jay
Member

Re: Programming help

Can you please tell me how

Offline

#4 November 3 2015

samer
Admin

Re: Programming help

Please read: How to ask questions.

Offline

Board footer