View Single Post
Join Date: Jun 2007
Posts: 11
Reputation: mnmustafa is an unknown quantity at this point 
Solved Threads: 0
mnmustafa mnmustafa is offline Offline
Newbie Poster

Re: for and while HELP

 
0
  #4
Jan 7th, 2009
well thnx for those articles, but this isnt my homework or something, i m trying to do this since 2 days, i am new, so ofcourse i need some help. well here is the program i wrote which has 7 errors
  1. # include <iostream>
  2. using namespace std;
  3.  
  4. int printStars (int lines,int stars,int space);
  5.  
  6. int main ()
  7. {
  8. printStars(lines, stars, space);
  9. return 0;
  10. }
  11.  
  12. int printStars (int lines,int stars,int space)
  13. {
  14. int lines, stars, space;
  15.  
  16. for (lines=1; lines<=4; lines++)
  17. {
  18. for (space= 4; space >=0; space--)
  19. {
  20. cout<<" ";
  21. while (space=0)
  22. {
  23. for (stars=1; stars<=lines; stars++)
  24. }
  25.  
  26. {
  27. cout<<"* ";
  28. }
  29.  
  30. }
  31. cout<<endl;
  32. }
  33.  
  34.  
  35. }

thnx
Last edited by mnmustafa; Jan 7th, 2009 at 2:06 am.
Reply With Quote