C program to scan two Hexadecimal numbers and compute the operation given

#include<stdio.h>
int main()
{
int i,j;
char c;
scanf(“%x %c %x”,&i,&c,&j);
switch(c)
{
case ‘+’:
printf(“%x\n”,i+j);
break;
case ‘-‘:
printf(“%x\n”,i-j);
break;
case ‘*’:
printf(“%x\n”,i*j);
break;
case ‘/’:
printf(“%x\n”,i/j);
break;
}
return 0;
}

C program to scan two Hexadecimal numbers and compute the operation given

స్పందించండి

Fill in your details below or click an icon to log in:

వర్డ్‌ప్రెస్.కామ్ లోగో

You are commenting using your WordPress.com account. నిష్క్రమించు /  మార్చు )

ఫేస్‌బుక్ చిత్రం

You are commenting using your Facebook account. నిష్క్రమించు /  మార్చు )

Connecting to %s

స్పామును తగ్గించడానికి ఈ సైటు అకిస్మెట్‌ను వాడుతుంది. మీ వ్యాఖ్యల డేటా ఎలా ప్రాసెస్ చేయబడుతుందో తెలుసుకోండి.