Jump to content


Photo
- - - - -

Double Script


  • Please log in to reply
6 replies to this topic

#1 -Govna-

-Govna-

    God of Boredom

  • Administrator
  • 3,841 posts
  • Gender:Male

Posted 23 February 2011 - 11:26 PM

Well, I got the idea to make this 'program' (I think it's more of a script) when, in science, we were talking about how cells divide, and how massive a single cell dividing can get. What it does is multiplys the 'cell' however many times you tell the program to do. I'm very proud of this :3.

#include <iostream>

using namespace std;

int main()
{
   int n, x, y, z;
   x = 1;
   n = 2;
   y = 1;

   cin >> z;
   cout << "The number of times you want the cell to divide is: " << z << endl;

   do
   {
    x = x * n;
     cout << x << endl;
     y++;
   }

   while (y <= z);

   char i;

   cout << "Goodbye!";
   cin >> i;

}


I added the 'Goodbye' part at the end so that the console would pause before closing.


  • 0
\(・ω・\) Losing (/・ω・)/my mind

#2 Fumika

Fumika

    Death's Messenger

  • Moderator
  • 1,502 posts
  • Gender:Female

Posted 23 February 2011 - 11:37 PM

LOL I'm making a video to explain the processes and difference between mitosis and meiosis

Coincidence?
  • 0
Death is cold, and I like the cold, therefore; I like death.
It is agonizing to leave half of yourself behind, but I don't mind.
Posted Image

#3 Chhansen

Chhansen

    thank you come again

  • Owner
  • 3,031 posts
  • Gender:Male

Posted 23 February 2011 - 11:45 PM

It's fate, Gothic :whistling:

Script looks good, except I personally name my variables to keep it more organized :tongue:
  • 0

Posted Image

~~~~~~~~~~~~~~~~~~~~~~~~~
I Gamer 4 Life - "I'm a gamer, I have lots of lives"

- Chhansen - 2008
~~~~~~~~~~~~~~~~~~~~~~~~~

IG4L Video: http://www.youtube.c...kiZEgqYs&fmt=22


#4 stewmeat95

stewmeat95

    Forum Know It All

  • Premium Member
  • 311 posts
  • Gender:Male

Posted 24 February 2011 - 05:14 PM

For me one of the main rules is to add tons of comments, even if its really obvious what something does. That way i can scroll through quickly and know what everything is and quickly know whats what. Im working on a digital clock now...pretty easy actually
  • 0
I Posted the 100, 000th post!

Posted Image

If you have a Missing File error (like d3dx9_42.dll), then go
here for the instructions on how to fix it.
If you are having any trouble with Hacks or just need help working hacks, check
here.
Having trouble injecting Hacks? Go here for instructions on how to inject.
If you wish to know functions of several hacks, go
here

Soccer is life
Soccer is heart
Soccer is love
Soccer is communication
Soccer is connection
Soccer is ME
SOCCER IS LIFE!



Click the green plus if you hate justin bieber

#5 -Govna-

-Govna-

    God of Boredom

  • Administrator
  • 3,841 posts
  • Gender:Male

Posted 24 February 2011 - 06:41 PM

I don't know how to add comments yet :D. And I named the variables that because I'm a Math Nerd. n - default variable. x y z - Graphs. If I ever make a real program, I will give them proper names. I just wanted to see if I could make a 'program' completely on my own.
  • 0
\(・ω・\) Losing (/・ω・)/my mind

#6 Fumika

Fumika

    Death's Messenger

  • Moderator
  • 1,502 posts
  • Gender:Female

Posted 24 February 2011 - 06:46 PM

It's fate, Gothic :whistling:

Script looks good, except I personally name my variables to keep it more organized :tongue:


WHAT I DEFY FATE >:OOO
Oh and I'm in computer science too but I'm hating it, so I'll transfer to design
  • 0
Death is cold, and I like the cold, therefore; I like death.
It is agonizing to leave half of yourself behind, but I don't mind.
Posted Image

#7 -Govna-

-Govna-

    God of Boredom

  • Administrator
  • 3,841 posts
  • Gender:Male

Posted 24 February 2011 - 06:54 PM

Oddly enough, there are no computer classes here. I can't wait till there are, really want to take those kinds of courses.
  • 0
\(・ω・\) Losing (/・ω・)/my mind