Question
Write a program in C for arithmetic operations between two integers. Your program should guide users with proper message/menu on the console.
Answer :
Word Count : 439
____ ___ _______ __________ ______ __________.
________ _________ ______ _____ ____ _________ _______ _________ _____ ____ _______.
__________ _________ _______ _______ ________ _______ _________ _______.
_____ __________ ________ __________ __________ ____ _____.
____ ____ _______ _____ ___ ________ _______ __________ ________.
___ ___ ______ ______ __________ ______ ______ _______ ___ ____ _______.
___ _____ ___ _________ ____ _____ _________ _____ __________ ________ ________.
_________ _____ ________ _________ _____ _________ ___ _______ ___.
_____ _________ _________ ____ ________ ________ __________ _________ ________ _________ _____ ______.
___ __________ ___ ___ ____ ________ ____ ______ _________ ____.
___ _________ _______ __________ __________ _________ ____.
______ ______ ______ __________ ___ _________ _______ __________.
__________ ____ ______ _________ _______ ____.
__________ ________ ________ _____ _______ ______ ____ ______ ________ _________ _________ _______.
__________ ____ ______ _________ ___ ___ ________ ___ ___ _____ _________ ____.
___ ____ _________ ___ _______ _______ _______ _____ ___ _________.
_______ _____ ______ ___ ____.
___ ________ _______ ________ ___ _________ ___ _____.
______ __________ _____ ________ _____ ________ _____ _____ __________.
_______ ________ __________ ___ _____.
____ ______ _____ ___ _______ _______.
_______ ______ ______ ______ ________ _____.
________ __________ ____ ______ ________ _________ _______ _____ ____ __________ ________.
___ _________ _______ _____ ____ ________ ____ ___.
_______ ________ ___ __________ ________ ____ ___ ____ ______ ____ ______ ________.
__________ _________ _______ _________ ___ __________ _______ _______ __________.
_____ _______ _______ _______ ______.
________ ________ _______ __________ __________ ______ _________.
_____ __________ ____ ______ _____ __________ ____.
_____ _________ ____ _________ _____ _____ _________ ________.
__________ ________ ___ ___ ______ ______ ______ _________.
_____ ___ ____ _______ _____ ________ ______.
____ _________ ___ ________ _________ ________ ________ _______ _______ _________ _____.
___ ______ ______ ________ ____.
______ ________ ______ ___ __________ ____ ____ ________ ______ ___ ________ ___.
_________ ______ __________ __________ __________ ________ ____ _______ ____ ___ _______ ______.
___ _______ ______ ___ ____ ______.
Skip in 10
```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
Continue Reading — It's Free
Sign in with Google to unlock more of this answer.
✓ Free access
✓ Unlock up to 60% of the answer
✓ No payment required
✓ Unlock up to 60% of the answer
✓ No payment required
Quick Google sign-in. No separate registration form.