well,no but i can make it if you want
@gourav111 you don’t need to make it for me, I just wanted to tell you that if you had a codeforce account then you can post your question there. you will always get answer in codeforce.
#include<stdio.h>
#include<conio.h>
int main()
{
long int a,b;
char c;
double k;
scanf("%c",&c);
scanf("%ld%ld",&a,&b);//cin>>a>>b;
if(c=='+')
printf("%ld",a+b);
else if(c=='-')
printf("%ld",a-b);
else if(c=='*')
printf("%ld",a*b);
else if(c=='/' && ( b==!0))
{
k= (float)a/b;
printf("%lf",k);
}
return 0;
}
Hope it helps
Your code is not giving correct output for division so change your code for division with the following:
else if ( c == '/') {
k = (float)a / (float) b;
cout << fixed << setprecision(6) << k; // printf("%0.6f", k);
}