/* verify demorgans theorem. */
#include <stdio.h>
#include <stdlib.h>
extern "C"{
unsigned int demorgan(unsigned int x,unsigned int y); //2 parameters.
}
void setup() {
Serial1.begin(9600); //initialising the serial port.
}
int main()
{
int x,y,result;
printf("Enter the 1st value: ");
scanf("%d",&x);
printf("%d\n",x); //to make sure it shows up on the serial monitor.
printf("Enter the 2nd value: ");
scanf("%d",&y);
printf("%d\n",y); //to make sure it shows up on the serial monitor.
result = demorgan(x,y);
if (result==1)
{
printf("Demorgan Theorem is verified.\n");
}
else {
printf("Demorgan Theorem is not verified.\n");
}
}