C

Monday, 2 October 2017

Program To Find The Value Of Integer Expressions

#include<stdio.h>
main()
{
int exp1, exp2, exp3;
clrscr();
exp1=4*5+5/2-9%2;
exp2=3*5/2+6*9%3+2*3-3;
exp3=3*(5+2*3)+25/(2*3+2);
printf("Value of first expression is : %d\n",exp1);
printf("Value of second expression is : %d\n",exp2);
printf("Value of third expression is : %d\n",exp3);

}

No comments:

Post a Comment

Write a program to draw a circle using mid-point circle drawing algorithm.

#include<iostream.h> #include<graphics.h> #include<conio.h> void drawcircle(int x0, int y0, int r) {         ...