Program to add,subtract,multiply and divide two whole numbers

#include<stdio.h>#include<conio.h>


void main() {
                      int a,b,c;
                      float d;
                      clrscr();
                      printf("Enter two whole numbers:\n");
                      scanf("%d%d",&a,&b);
                      c=a+b;
                      printf("\nSum=%d",c);
                      c=a-b;
                      printf("\nDiffference=%d",c);
                      c=a*b;
                      printf("\nMultiplication=%d",c);
                      d=(float)a/b;
                      printf("\nDivision=%f",d);
                      getch();
                     }
Share on Google Plus

About Unknown

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment

0 comments:

Post a Comment