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.
#include
#include
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——-
Subtraction=13
Multiplaction=68
Divistion=4
C Program with run time declearction.
#include
#include
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——-
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!