Programming Examples

Arduino program to read a integer number and print its table


reading number in Arduino

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);
    }
  }
}
▶ RUN

Output/ Explanation:

Latest Current Affairs 2025 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online MBA 2 years Online MCA Online BCA Best Website and Software Company in Allahabad