Calculator program in C language . First of all let us know its logic .how is this working . Now let's see it's process . In C language , %d is used to define it's integers and %f is used to define it's floats. In C language , the (+) sign is used as a plus , the (-) sign used as a minus , the (*) sign is used for multiplies and the (/) sign is used for division. %0.2f it means any float value like 52.987 = 52.98.it show only 2 place of the decimal. PROGRAM /*ARITHMETIC PROGRAM IN C LANGUAGE*/ #include"stdio.h" int main() { float a,b,sum,sub,mult,div ; char sign; printf("SELECT ANY SIGN (+ - * / ) :"); scanf("%c",&sign); printf("ENTER THE FIRST NUMERIC VALUE:"); scanf("%f",&a); printf("ENTER THE SECOND NUMERIC VALUE:"); scanf("%f",&b); switch(sign) { case '+':...
The site contents Educational regarding C language.