|
Post by Prone on Oct 27, 2006 6:46:10 GMT -8
Strange loop program #include <iostream> #include <iomanip> using namespace std;
int main()
{
int count;
count = 1;
for (count = 1; count <=80; count++)
{
cout << setw(count) << count << endl;
if (count == 80)
{
for (count == 80; count >= 0; count--)
{
cout << setw(count) << count << endl;
}
}
}
return 0;
}
Program sample with count <= 10 instead of count <= 80: Just a wacky little program i created for my computer science class one day! What is the sum up to that number??? A program to calculate the sum of all numbers up to a number you choose
|
|
dxlightning
Platinum Membership
[ss:LostPeon's Gray][ss:LostPeon's Gray]
Posts: 1,246
|
Post by dxlightning on Oct 28, 2006 18:05:57 GMT -8
Congrats. I've known how to do that on my calculator since 7th grade.
|
|
|
Post by Prone on Oct 29, 2006 17:37:24 GMT -8
Well then, i congrat you!
|
|
|
Post by ♦Whot♦ on Oct 31, 2006 16:09:01 GMT -8
It's in my grade 8 math textbook...
|
|
|
Post by Prone on Nov 2, 2006 7:20:27 GMT -8
Want me to show you a program that has the most crazy loops you've ever seen. There are four vertical bands and they appear to be criss-crossing each other. Should i show you the code?
|
|
PhoenixFlare500
Diamond Membership
I like chocolate[ss:LostPeon's Gray][ss:LostPeon's Gray]
Posts: 896
|
Post by PhoenixFlare500 on Nov 2, 2006 17:27:53 GMT -8
How 'bout showing us the actual program??
|
|
|
Post by ♦Whot♦ on Nov 2, 2006 18:13:23 GMT -8
Or how about no and stop wasting valuable (yet unlimited) space of triviahost. We do not even need to know, or care.
|
|
|
Post by LostPeon™ on Nov 2, 2006 21:46:37 GMT -8
Yeah, what Whot said.
We get it, you can write programs, albeit simple ones.
You don't see me going around bragging about my code that takes the inputs for a rigid girder frame system, solves massive sets of linear equations, and not only computes the displacement due to the given force, but graphs it too.
Take that.
|
|
|
Post by Prone on Nov 3, 2006 7:51:56 GMT -8
it seems you got the best of me!
err, its been about only 2 to 3 months since i've been in the class, peon, and im already dealing with structures and classes. How much experience do you have, peon? Like more than me!
side note: WhoT, in your sig the person's leg can be seen to go under the stairs, which is impossible. Can you fix it?
|
|
|
Post by rabidgecko on Nov 3, 2006 16:09:11 GMT -8
GOD STFU
|
|
|
Post by technohawk on Nov 3, 2006 16:54:51 GMT -8
|
|
|
Post by ♦Whot♦ on Nov 3, 2006 16:59:54 GMT -8
Prone, what are you talking about? There's no person in my sig.
|
|
|
Post by grayfox7 on Nov 3, 2006 18:18:25 GMT -8
He means your avatar, with the guy falling down the stairs.
*waits for Lost to delete all of these posts*
|
|
|
Post by LostPeon™ on Nov 3, 2006 18:38:15 GMT -8
|
|