Develop a C program to evaluate enlisted expression
(1) b*c/d-2+b/c (where b=4,c=2,d=2)
Output#include <stdio.h>int main(){int b=4, c=2, d=2;printf("%d\n",b*c/d-2+b/c);return 0;}
#include <stdio.h>int main(){printf("%f\n",20.0-(5.5/(0.5*10.0))+15.0);return 0;}
(3) (++a) - (--b) * (++a) / (b++) where a=5 and b=5
#include <stdio.h>int main(){int a=5, b=5, result;result = (++a) - (--b) * (++a) / (b++);printf("%d\n", result);return 0;}
0 Comments
Post a Comment