//#include <NewPing.h> // library for ultrasound
#include <LiquidCrystal.h>
const int rs=12, en=11, d4=5, d5=4, d6=3, d7=2;
LiquidCrystal lcd(rs,en,d4,d5,d6,d7);
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
lcd.begin(16,2);//16 means no. of cols and 2 means no. of rows in the lcd
}
void loop() {
// put your main code here, to run repeatedly:
int a=6,b=2,total=a+b,sub=a-b;
lcd.setCursor(0,0);
lcd.print(a);
lcd.print("+");
lcd.print(b);
lcd.print("=");
lcd.print(total);
lcd.setCursor(0,1);
lcd.print(a);
lcd.print("-");
lcd.print(b);
lcd.print("=");
lcd.print(sub);
}