Simple Arithmetic Operation in C Language

  • on February 4, 2019
  • Likes!
Hello Frinds! Welcome to my Website
C Language based program that is for basic Arithmetic operations like addition, subtraction, multiplication, and division. You can use this program both error(compiler and runtime error) free program just copy and paste the program and save your time.

C Program with the initial declaration.

———Start code———
         #include<stdio.h>
         #include<conio.h>
         void main()
         {
           int a=17,b=4,sum,subtarction, multiplaction,divistion;
          clrscr();
          sum=a+b;
          subtarction=a+b;
          multiplaction=a*b;
          divistion=a/b;
          printf(“Sum=%dn”,sum);
          printf(“Subtraction=%dn”,subtarction);
          printf(“Multiplaction=%dn”,multiplaction);
          printf(“Divistion=%dn”,divistion);
          getch();
        }
——End code——-
Output:  Sum=21
                Subtraction=13
                Multiplaction=68
                Divistion=4

Note: Integer type variable only store non-friction vlaue

C Program with run time declearction.

———Start code———
       #include<stdio.h>
       #include<conio.h>
       void main()
       {
         int a, b,sum,subtarction, multiplaction,divistion;
         clrscr();
         printf(“Enter frist opertater value:”);
         scanf(“%d”, &a);
         printf(“n”);
         printf(“Enter secand opertater value:”);
         scanf(“%d”, &b);
         printf(“n”);
         sum=a+b;
         subtarction=a-b;
         multiplaction=a*b;
         divistion=a/b;
         printf(“Sum=%dn”,sum);
         printf(“Subtraction=%dn”,subtarction);
         printf(“Multiplaction=%dn”,multiplaction);
         printf(“Divistion=%dn”,divistion);
         getch();
       }
——End code——-
  Output:  Enter frist opertater value:20
                  Enter secand opertater value:4
                  Sum=24
                  Subtraction=16
                  Multiplaction=80
                  Divistion=5
               

I make this programming and hope you are like the post if are you like the post you can please comment and Share the post to reach more people.
If any dought about this c programming code or input & output please comment below
If you have other question about c programming send an email by contacting us form are given on page right side.
Thank You!

Article Categories:
Programs in c

Leave a Reply

Your email address will not be published. Required fields are marked *