This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Grokking Bitcoin and have Kalle Rosenbaum on-line!
See this thread for details.
Win a copy of Grokking Bitcoin this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
Bartenders:
  • Carey Brown
  • salvin francis
  • Claude Moore

Display of USA flag at Command Prompt???  RSS feed

 
Ranch Hand
Posts: 67
Debian Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is a glimpse of endeavor to draw the flag of USA on Gnome or XFCE Terminal or Windows Command Prompt or KDE Konsole.


Is it possible to check if I am successful or not?





 
lowercase baba
Posts: 12737
51
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
does it compile? does it run? what happens when you run it?
 
Mark Ii
Ranch Hand
Posts: 67
Debian Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

fred rosenberger wrote:does it compile? does it run? what happens when you run it?




It runs. But it is resolution dependent. On widescreen monitor and close to square resolution the flag acts kind of odd one in a correct format and one stretched. Is this behavior okay? Can this be fixed?
 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mark,

You should consider making your code more readable, so it's easier to understand for people to review your code. Here are some points to consider:

- You have one long method with nested for/if. Consider using methods. You could, for example, create a method which takes a Strings and a number n as input and prints the string n times.
- Try to find an alternative for the first_time / second_time.

 
You don't like waffles? Well, do you like this tiny ad?
ScroogeXHTML - the small and fast RTF to HTML converter library
https://coderanch.com/t/707504/ScroogeXHTML-RTF-HTML-XHTML-converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!