User:Lokuge100

int sum (int x,int y) { int z; z=x+y; return z; } int sub (int x,int y) { int z ; z=x-y; return z; } int mult (int x,int y) { int z; z=x*y; return z; } float dev (int x,int y) { float z; z=x/y; return z; } void main { int a,b,c; int d; clrscr; printf("ENTER YOUR FIRST NUMBER\n"); scanf("%d",&a); printf("ENTER YOUR SECOND NUMBER\n"); scanf("%d",&b); int i=1; printf("what kined of operation do you wanna apply .please choose from the list:\n%d)ADDITION(+)\n%d)DIFFERENCE(-)\n%d)MULTIPLICATION(*)\n%d)DIVISION(/)\n",i,i+1,i+2,i+3); scanf("%d",&c);
 * 1) include
 * 2) include

switch (c) { case 1 : d=sum(a,b); printf("%d + %d = %d\n",a,b,d); break; case 2: d=sub(a,b); printf("%d - %d = %d\n",a,b,d); break; case 3: d=mult(a,b); printf("%d * %d = %d\n",a,b,d); break; case 4 : if (b>0) { d=dev(a,b); printf("%d / %d = %d\n",a,b,d); } else if (b<0) { d=dev(a,b); printf("%d / %d = %d\n",a,b,d); } break; } printf("                send your feed back-LOKUGE100@GMAIL.COM\n"); printf("                            ���� THANK YOU ����         "); getch; }