0% found this document useful (0 votes)
20 views1 page

Arithmetic Operations

The document contains code for two C programs that perform basic arithmetic operations. The first program adds, subtracts, multiplies, divides, and finds the remainder of integers x and y. The second program adds integers x and y and prints the result.

Uploaded by

Mitali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views1 page

Arithmetic Operations

The document contains code for two C programs that perform basic arithmetic operations. The first program adds, subtracts, multiplies, divides, and finds the remainder of integers x and y. The second program adds integers x and y and prints the result.

Uploaded by

Mitali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

// program on Arithmetic Operations

#include <stdio.h>

int main()
{
int x=20, y=3;

printf("\nX+Y=%d",x+y);
printf("\nX-Y=%d",x-y);
printf("\nX*Y=%d",x*y);
printf("\nX/Y=%d",x/y);
printf("\nX%%Y=%d",x%y);

return 0;
}

#include <stdio.h>
int main()
{
//Set value of X and Y
int x=5,y=8,z;

//Compute addition of X & Y


z=x+y;

//Display the result


printf("Value of %d+%d=%d\n", x,y,z);

return 0;
}

You might also like