-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAssignment7.ino
More file actions
37 lines (35 loc) · 1.01 KB
/
Assignment7.ino
File metadata and controls
37 lines (35 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*
Evil.inc industries
Powered by Michael Lammers
*/
int multipier;
int result;
int input;
void setup()
{
Serial.begin(9600);
}
void loop (){
if (Serial.available() > 0)
{
input= Serial.parseInt(); // this frunction reads only the number from the keyboard
if(input>=1 && input <=99){
for(int multipier=1; multipier<=9; multipier++)
{
result = multipier*input ;//the multipier of this equeation will be showen in the end
Serial.print(multipier);
Serial.print(" ");
Serial.print("*");// only print **
Serial.print(" ");
Serial.print(" ");
Serial.print(input);
Serial.print("=");// it will only print =
Serial.println(result);
delay(10);// this delay will make the printing slower so we can se it
}
}
else{
Serial.println("Wrong value entered");
}
}
}