SHARE
TWEET

Multiplying the Previous Outputs “While” Each Output is Less

jmyean Mar 21st, 2019 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2.  * Jung Min Yean
  3.  * March 20, 2019
  4.  * Program to print a variable ten times
  5.  * Ver 1
  6.  */
  7.   // define constants and variables
  8. int x = 3;
  9.  
  10. void setup()
  11. {
  12.   // declare your input and output
  13.   Serial.begin(9600);
  14.    while(x < 2000)
  15.   {
  16.     Serial.println(x); // + is add; - is subtraction; * is multiplication; / is division
  17.     x = x * 2;
  18.   }
  19. }
  20. void loop()
  21. {
  22.   // put your main code here, to run repeatedly:
  23.    
  24. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top