Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  1
Language: C/C++
Code:
#include <stdio.h>
 
int main()
{
   int first, second, add, subtract, multiply;
   float divide;
 
   printf("Enter two integersn");
   scanf("%d%d", &first, &second);
 
   add        = first + second;
   subtract = first - second;
   multiply = first * second;
   divide     = first / (float)second;   //typecasting
 
   printf("Sum = %dn",add);
   printf("Difference = %dn",subtract);
   printf("Multiplication = %dn",multiply);
   printf("Division = %.2fn",divide);
 
   return 0;
getch();
}
          
          
          
Comments: