Advertisement
jmyean

Repeating an Integer “For” “n” Times

Mar 21st, 2019
137
0
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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement