This week's book giveaway is in the Go forum.
We're giving away four copies of Head First Go and have Jay McGavren on-line!
See this thread for details.
Win a copy of Head First Go this week in the Go 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
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Devaka Cooray
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Tim Holloway
  • Claude Moore
  • Stephan van Hulst
Bartenders:
  • Winston Gutkowski
  • Carey Brown
  • Frits Walraven

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

 
Ranch Hand
Posts: 55
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: 12727
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: 55
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: 45
  • 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.

 
He was giving me directions and I was powerless to resist. I cannot resist this tiny ad:
Become a Java guru with IntelliJ IDEA
https://www.jetbrains.com/idea/
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!