Question

Write a program in C for arithmetic operations between two integers. Your program should guide users with proper message/menu on the console.

30 Nov 2017
Answer :
Word Count : 439

```c
#include <stdio.h>

int main() {
    int num1, num2, choice;
    int result;

    // Display the menu to the user
    printf("Select an operation:\n");
    printf("1. Addition\n");
    printf("2. Subtraction\n");
    printf("3. Multiplication\n");
    printf("4. Division\n");
    printf("Enter your choice (1-4): ");
    scanf("%d", &choice);

    // Get two integers from the user
    printf("Enter two integers: ");
    scanf("%d %d", &num1, &num2);

    // Perform the chosen operation
    switch (choice) {
        case 1:
            result = num1 + num2;

____ ___ _______ __________ ______ __________.
________ _________ ______ _____ ____ _________ _______ _________ _____ ____ _______.
__________ _________ _______ _______ ________ _______ _________ _______.
_____ __________ ________ __________ __________ ____ _____.
____ ____ _______ _____ ___ ________ _______ __________ ________.
___ ___ ______ ______ __________ ______ ______ _______ ___ ____ _______.
___ _____ ___ _________ ____ _____ _________ _____ __________ ________ ________.
_________ _____ ________ _________ _____ _________ ___ _______ ___.
_____ _________ _________ ____ ________ ________ __________ _________ ________ _________ _____ ______.
___ __________ ___ ___ ____ ________ ____ ______ _________ ____.
___ _________ _______ __________ __________ _________ ____.
______ ______ ______ __________ ___ _________ _______ __________.
__________ ____ ______ _________ _______ ____.
__________ ________ ________ _____ _______ ______ ____ ______ ________ _________ _________ _______.
__________ ____ ______ _________ ___ ___ ________ ___ ___ _____ _________ ____.
___ ____ _________ ___ _______ _______ _______ _____ ___ _________.
_______ _____ ______ ___ ____.
___ ________ _______ ________ ___ _________ ___ _____.
______ __________ _____ ________ _____ ________ _____ _____ __________.
_______ ________ __________ ___ _____.
____ ______ _____ ___ _______ _______.
_______ ______ ______ ______ ________ _____.
________ __________ ____ ______ ________ _________ _______ _____ ____ __________ ________.
___ _________ _______ _____ ____ ________ ____ ___.
_______ ________ ___ __________ ________ ____ ___ ____ ______ ____ ______ ________.
__________ _________ _______ _________ ___ __________ _______ _______ __________.
_____ _______ _______ _______ ______.
________ ________ _______ __________ __________ ______ _________.
_____ __________ ____ ______ _____ __________ ____.
_____ _________ ____ _________ _____ _____ _________ ________.
__________ ________ ___ ___ ______ ______ ______ _________.
_____ ___ ____ _______ _____ ________ ______.
____ _________ ___ ________ _________ ________ ________ _______ _______ _________ _____.
___ ______ ______ ________ ____.
______ ________ ______ ___ __________ ____ ____ ________ ______ ___ ________ ___.
_________ ______ __________ __________ __________ ________ ____ _______ ____ ___ _______ ______.
___ _______ ______ ___ ____ ______.
IGNOU ACADEMY
Your IGNOU journey, made easier.
  • Solved Assignments
  • Study Notes
  • Guess Papers
  • Question Papers
Skip in 10
Top
📞
Call Support Instant phone assistance IGNOU MCS 11 2010 - Write a program in C for arithmetic operations between two integers. Y | IGNOU Academy
→
🟢
WhatsApp Chat Fast live messaging
→
Email Us Business enquiries & support
→