SHARE
TWEET

Repeating an Integer “For” “n” Times

jmyean Mar 21st, 2019 74 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.    for(int count = 1; count <=10; count++)
  15.   {
  16.     Serial.println(x);
  17.   }
  18. }
  19. void loop()
  20. {
  21.   // put your main code here, to run repeatedly:
  22.    
  23. }
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
 
Top