C program for simple Arithmetic Operation

C program to find the Addition, Subtraction, Division, Multiplication and Modulo of two numbers.

In this post, I shared a code to find the simple arithmetic operation results for the given two numbers.



#include <stdio.h> 
#include <conio.h>
void main()
{
 int a,b,add,sub,mul,div,mod;
 printf("enter first number" );
 scanf(“%d”,&a);
 printf("enter second number" );
 scanf(“%d”,&b);
 printf("ARITHMETIC OPREATION\n" );
 add=a+b;
 sub=a-b;
 mul=a*b;
 div=a/b;
 mod=a%b;
  printf("\naddition is=%d",add);
 printf("\nsubstraction  is=%d",sub);
 printf("\nmultiplication is=%d",mul);
 printf("\ndivision is=%d",div);
 printf("\nmodule is=%d",mod);
 getch();
}




Happy Coding :)

Comments

Popular posts from this blog

MultiSelection of Item in Recycler View

Upload Image From Android To Php Server

Merge Sort