Simple C Programming Based On Arithmetic Operation

Introduction 
  • I have explained in this article about an arithmetic operation in a simple manner and in a way you can clearly understand so as to learn it. 
Software Requirements 
  •  Turbo C++ OR C 
Programming 
  1. #include <stdio.h>  
  2. int main()  
  3. {  
  4. int first, second, add, subtract, multiply;  
  5. float divide;  
  6. printf("Enter two integers\n");  
  7. scanf("%d%d", &first, &second);  
  8. add = first + second;  
  9. subtract = first - second;  
  10. multiply = first * second;  
  11. divide = first / (float)second;  
  12. printf("Sum = %d\n",add);  
  13. printf("Difference = %d\n",subtract);  
  14. printf("Multiplication = %d\n",multiply);  
  15. printf("Division = %.2f\n",divide);  
  16. return 0;  
  17. }  
Explanation 
  •  Here I have upload the program exactly how the operation is performed, in a simple manner. 
Output 

output

Conclusion
  • Thus the program has been created succesfully.
X

Build smarter apps with Machine Learning, Bots, Cognitive Services - Start free.

Start Learning Now