answersLogoWhite

0

#include<stdio.h>

void main()

{

int num1, num2,res;

char ch;

printf("\n Enter the 1st operand");

scanf("%d",&num1);

printf("\n Enter the operator");

scanf("%c",&ch);

printf("\n Enter the 2nd operand");

scanf("%d",&num2);

switch(ch)

{

case '+' :res=num1+num2; break;

case '-' :res=num1-num2; break;

case '*' :res=num1*num2; break;

case '/' :res=num1/num2; break;

}

printf("\n The result of %d %d %d is =%d",num1,ch,num2,res);

}

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

How do you write a arithmetic operations in c using compound assignment statement?

a = b = c


Write a programme to perform binary operations on integer argument The arguments and operators should be accepted using command line parameters?

There are many different operators, which are you referring to?


How you can write an account of prime numbers in arithmetic progressions?

There is no simple answer because there is no simple rule for primes: it is certainly NOT an arithmetic progression.


How do write searching number programme in java?

give description of that then i will send the answer


Write a c programme to draw a rainbow?

Write a C program to Draw a RAINBOW and fill the suitable colors ...


How is event driven programming different from other programming?

write a note on event driven programming


Write a program in C for arithmetic operations between two integers your program should guide users with proper message or menu on the console?

Write a program in C for showing working of different logical operator in C.Your program should guide users with proper message/menu on the console. (5 Marks)


Write a C programme to count the number of vowals present in your name?

abhimanyu


How do i Write a programme to show the fabonasi numbers?

Step 1. Learn the word "Fibonacci"...


How do you write c programme to find proper subset of a given string?

you can use strstr()


What is the Th term of the arithmetic sequence given by the explicit rule?

The answer depends on what the explicit rule is!


What is printer in Arabic?

Write the basic computer operations