C Program for Arithmetic Operators:
#include<stdio.h>
#include<conio.h>
main()
{
int a,b;
clrscr();
printf("Enter the value of a:");
scanf("%d", &a);
printf("\nEnter the value of b:");
scanf("%d", &b);
printf("\nThe Addition value is = %d", a+b);
printf("\nThe Subtraction value is = %d", a-b);
printf("\nThe Multiplication value is = %d", a*b);
printf("\nThe Division value is = %d", a/b);
printf("\nThe Modulus value is = %d", a%b);
getch();
}
#include<stdio.h>
#include<conio.h>
main()
{
int a,b;
clrscr();
printf("Enter the value of a:");
scanf("%d", &a);
printf("\nEnter the value of b:");
scanf("%d", &b);
printf("\nThe Addition value is = %d", a+b);
printf("\nThe Subtraction value is = %d", a-b);
printf("\nThe Multiplication value is = %d", a*b);
printf("\nThe Division value is = %d", a/b);
printf("\nThe Modulus value is = %d", a%b);
getch();
}
No comments:
Post a Comment