#programmingStructures
Explore tagged Tumblr posts
fazellnasiri-official · 5 years ago
Photo
Tumblr media
A program is a set of instructions that the computer executes. But I did not get into details about the order they would be executed. This is where programming constructs come into action. They are used to control the order/flow in which instructions are executed (or not executed). In programming languages, the expression which translates to an instruction is called a programming statement or just statement. - #program #programmingstructures #webdeveloper #learning #python #PHP #java #javascript #development #statements #construction #code #algorithm https://www.instagram.com/p/B_t0iUunrHQ/?igshid=1nwa7v6ut7t51
0 notes
cdavalo1-blog · 11 years ago
Video
tumblr
ASSIGNMENT 2
int led[9]={A5,A4,2,3,4,5,6,7,8,};
int led2[9]={9,10,11,12,13,A0,A1,A2,A3};
void setup() {               
  for (int i=0;i<9;i++) {
    pinMode(led[i], OUTPUT);
  }            
  for (int i=0;i<9;i++) {
    pinMode(led2[i], OUTPUT);
  }
}
void loop() {
  for(int i=0;i<9;i++) {     
    for(int j=0;j<9;j++) {
      digitalWrite(led[j], HIGH);
      delay(100);
    }    
    for(int k=8;k>=0;k--) {
      digitalWrite(led[k], LOW);
      delay(0);
    }
    digitalWrite(led2[i], HIGH);
    delay(100);
   }
       for(int i=0;i<9;i++){
      digitalWrite(led[i], HIGH);
      delay(100);
    }
     //Reversed Loop***********************************
     for(int i=8;i>=0;i--) {     
    for(int j=8;j>=0;j--) {
      digitalWrite(led[j], LOW);
      delay(100);
    }    
    for(int k=0;k<9;k++) {
      digitalWrite(led[k], HIGH);
      delay(0);
    }
    digitalWrite(led2[i], LOW);
    delay(100);
  }
    for(int j=8;j>=-1;j--) {
      digitalWrite(led2[j], LOW);
      delay(0);
    }
for(int j=8;j>=-1;j--) {
     digitalWrite(led[j], LOW);
     delay(0);
  }
}
0 notes