Programming Examples
Arduino program to read a integer number and print its table
Arduino program to read a integer number and print its table
Solution
int num = 0;
int a;
void setup() {
Serial.begin(9600);
}
void loop() {
if (Serial.available() > 0)
{
num = Serial.parseInt();
Serial.print("Table of : ");
Serial.println(num);
for(a=1;a<=10;a++)
{
Serial.println(num*a);
}
}
}
Output