I will.
I will.
For the second one you could use nested for loops.
Or do it the simpler way and use a load of cout statements
Double Helix STL
for program number 2 what I need to do is ask for the number of asterisks in the bow tie and save that to a variable. Then take that variable and print out a bow tie looking thingamabob.
Sort of like this.
assuming 17 asterisks
* *
** **
*****
** **
* *
lets try that again.
assuming 17 asterisks
*_____*
**___**
***_***
**___**
*_____*
Code... Show us code. We are remarkably incapable of solving problems. We are programmers, after all. We need code.
Originally Posted by brewbuck:
Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.
Well in that case create a variable to hold the value then use that value in a loop condtion to create the image you need.
example
Code:cout << "How many stars: "; cin >> stars; for ( int i = 1; i < stars; i++ ) cout << '*';
Double Helix STL
BTW, I absolutly suck at math and have avoided it so far in my classes so please dont assume that I understand all of the jargon. I understand that I should probably go out and learn it but I have a right to be lazy and darnit I exercise my rights. If you could try to help me without confusing me that would be great, all of the other message boards I have tried have jargoned me to the point that they started calling me a hopeless n00b.
Also the sort and search program is supposed to use something called bubble sort and binary search. I dont know what those are really.
Oops, that wasent directed at you swgh, just bad timing on the post.
By the way, would it be a problem if I am using 2 different compilers to write my programs?
If you know how to count then it shouldn't be hard. The number of spaces decreases while the number of stars increase, when it gets to the middle it does the opposite. It's
Google either Bubble sort and binary seach, if you're no good in math ignore the O(logN) and O(N^2) etc but I don't see how you can use those without understanding basic concepts that slip your grasp.
What's the name of the course BTW. If it has a I in its title you should kidnap your teacher's dog to teach him a lesson
Not really but you should stick to one that you are happy with and avoid switching overBy the way, would it be a problem if I am using 2 different compilers to write my programs?
unless needs arise. Bubble sort uses arrays to acheive the results. Other mehods for sorting are vectors, interators and algorithms. I advise you look up all you can on your problems too. Try buying a decent beginners book, check out the recomendations on this site for the ones to get.
Double Helix STL
I dont get that indigoWhat's the name of the course BTW. If it has a I in its title you should kidnap your teacher's dog to teach him a lesson
Double Helix STL
If it's an introductory programming course, I don't think he should be asking you to use anything but library implementations of bubble sort and binary search. In other words, is your teacher asking you to re-create these algorithms or just use the algorithm library. If not then kidnap his dog, gain leverage.
computer science 165
Yes. It's always the teacher's fault. Students never say these things:
Originally Posted by nesagsar
Originally Posted by brewbuck:
Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.