Hari Prasad
/
O_gate
exp1b
Revision 0:ae2eec2171cd, committed 2015-06-18
- Comitter:
- harseed951
- Date:
- Thu Jun 18 09:27:29 2015 +0000
- Commit message:
- exp1b;
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Jun 18 09:27:29 2015 +0000 @@ -0,0 +1,47 @@ +#include "mbed.h" + +DigitalOut a(LED1),b(LED2),c(LED3),d(LED4); + +int main() { + while(1) { + int i=1,j=1,q,w,e; + q=i*j; + switch(q) + { + case 1: + a=1; + break; + case 0: + a=0; + break; + } + w=i+j; + if(w==0) + { + b=0; + } + if(w>=1) + { + b=1; + } + if(i==0) + { + c=1; + } + if (i==1) + { + c=0; + } + if(i==j) + { + d=0; + } + if(i!=j) + { + d=1; + } + } + + + } +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Jun 18 09:27:29 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/7cff1c4259d7 \ No newline at end of file