Programming Shortcut

Write, Run and execute Your programs with simple and esay way by Programming Shortcut

Monday, February 4, 2019

Simple Arithmetic Operation in C Language

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=%d\n",sum);
          printf("Subtraction=%d\n",subtarction);
          printf("Multiplaction=%d\n",multiplaction);
          printf("Divistion=%d\n",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=%d\n",sum);
         printf("Subtraction=%d\n",subtarction);
         printf("Multiplaction=%d\n",multiplaction);
         printf("Divistion=%d\n",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!


Programming Shortcut is collections in java best programs with example, best c programs with example and best c++ programs with example, best way to learn java, c and c++

About Programming Shortcut

This is a programming learning website that can help you learn and when your write your programming code. And all programming code is compiled run programming code in the following programming language C, c++, Java, php and Javascript Languages. find your programming read, understand the programming then copy and past and run your program and save your golden time to typing the program becuse you learn more in leas time. All Programming is codeing is ease to understand the programming