C

Sunday, 20 August 2017

Program to Perform all the Arithmetic Operations

#include<stdio.h>
main()
{
int first,second,Add,Sub,Mul;
float Div;
clrscr();
printf("Enter two integer numbers\n");
scanf("%d%d",&first,&second);
Add=first+second;
Sub=first-second;
Mul=first*second;
Div=first/second;
printf("Sum=%d\n",Add);
printf("Difference=%d\n",Sub);
printf("Multiplication=%d\n",Mul);
printf("Division=%f\n",Div);
return 0;
}



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) {         ...