Question: The following program prints the even numbers between 0 and 5 0 that are multiples of 3 on the serial monitor. [ Note: We used

The following program prints the even numbers between 0 and 50 that are multiples of 3 on the serial monitor.[Note: We used a for loop with increment of 3?][we could have used i%6 instead of i%2 with an increment of 1?] void setup() & Serial.begin(9600); int i=0;
for )=0;i50;i=(i+3 f if )==(0
i }
Serial.println(i) ; }
}
void loop(){
}
What is the "%" operator?
A
Edit the code in Part 7 to print out the odd numbers between 0 and 50.[Hint: Use a for loop with increment of 1?].
 The following program prints the even numbers between 0 and 50

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!