code to find +,-,×,/ of two numbers



COMBINE CODE TO FIND THE
          ADDITION, SUBTRACTION, DIVISION, MULTIPLICATION, AND REMAINDER OF TWO NUMBERS

C language code for addition,subtraction,multiplication,division and modulo:

#include<studio.h>
#include<condo.h>
float main ()
{
float a, b,add, sub, mul, div, rem;
closcr();
printf ("ENTER THE TWO NUMBERS TO FIND THE ADDITION ,SUBTRACTION, MULTIPLICATION, DIVISION, REMAINDER\n");
scanf ("%f%f",&a&b);
add=a+b;
sub=a-b;
mul=a×b;
div=a/b;
rem=a%b;
printf ("ADDITION=%f\n", add);
printf ("SUBTRACTION=%f\n", sub);
printf ("MULTIPLICATION=%f\n", mul);
printf ("DIVISION=%f\n", div);
printf ("REMAINDER=%f\n", rem);
getch();
return();
}
                Friends in this code we perform all operations. If we use floating points then it accepts the integers also, so better way use float points.
                In this code clrscr() is new concept.It means that the previous output is clear. Try it automatically you learn.
The following images show the actual code and output screen.

                This is the input screen I.e.coding screen.




              This Window shows that there is no error in the code.

              This is the final output screen with example.

              Friends such information I was typing on mobile so remainder operations are not possible but on the latest version it did or on the computer it did easily.
              If any query is there then write in the comment box.Thank you...
     



code to find +,-,×,/ of two numbers code to find +,-,×,/ of two numbers Reviewed by Amit Waghmare on September 18, 2018 Rating: 5

No comments: