C and C++

Moderators: None (Apply to moderate this forum)
Number of threads: 28629
Number of posts: 94611

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Help with framing output of code Posted by Madmax86 on 29 Sept 2012 at 5:43 PM
I had a membership to this site(stpdougie) but i could not login even when changing my password so created another account here goes.

i have made a program using a switch statement (case) it works fine,it basically does calculations and displays other info.The only problem is i want to outline the output in a frame of asterisks i have already made the frame using for loops but i have no idea how to implement it with my code here is the frame :


 for(int down = 0; down < 20; down++)
{
for(int across = 0; across < 40; across++)
  {
if ( down == 0 || down == 19)
  printf("*");
 else if (across == 0 || across ==39 )
 printf ( "*");
 else printf(" ");
 




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.