Pages

Tuesday, 25 December 2012

SIMPLE CALCULATOR



/* simple calculator */
#include<stdio.h>
#include<string.h>
void main()
 {
  int a,b;
  printf("Enter two Numbers:");
  scanf("%d%d",&a,&b);
 /* printf("Enter the operation you need:\n");
  scanf("%c",op);*/


    printf("The sum is %d\n",a+b);

    printf("The Difference is %d\n",a-b);

    printf("The Division is %d\n",a/b);

    printf("The Multiplication is %d\n",a*b);

 }



No comments:

Post a Comment