Write a C program Integer arithmetic operations or write a c program to find sum,sub,mul, div & rem.

Write a C program Integer arithmetic operations or write a c program to find sum,sub,mul, div and Reminder of Two Number.

#include<stdio.h>

void main()

{

int a=10,b=5;

clrscr();

printf("Sum of two number is=%d\n",a+b);

printf("Sub of Two Number is =%d\n",a-b);

printf("Multiply of Two Number is=%d\n",a*b);

printf("Div of tow number is=%d\n",a/b);

printf("Remainder of two number is =%d\n",a%b);

getch();

}



or other ways

write a c program to find sum,sub,mul, div and Reminder of Two Number.

#include<stdio.h>

void main()

{

int a=10,b=5,sum,sub,mul,div,rem;

clrscr();

sum=a+b;

sub=a-b;

mul=a*b;

div=a/b;

rem=a%b;

printf("Sum of two number is=%d\n",sum);

printf("Sub of Two Number is =%d\n",sub);

printf("Multiply of Two Number is=%d\n",mul);

printf("Div of tow number is=%d\n",div);

printf("Remainder of two number is =%d\n",rem);

getch();

}


10 views0 comments

Recent Posts

See All