hi!!!
im a new member of this organization of the IT's.

im a freshmen student ,takig up IMFORMATION TECHNOLOGY and i have a problem regarding how to make a calculator using SWITCH CASE,
i've tried to make a program of that using other functions and it made it successfully but when i used SWITCH CASE i've got two errors and i cat find where the errors is? i just wanna ask an examle of it?,,,...

You seem to have mentioned that you have attepted to make some sort of effort at seeking a solution to the problem. I'm sure myself and others would be highly interested in seeing what you have come up with thus far; thereby seperating yourself from the masses of "please do this for me" laziness that we are so often subjected to on a daily basis.

commented: Indeed. +2

hi!!!
im a new member of this organization of the IT's.

im a freshmen student ,takig up IMFORMATION TECHNOLOGY and i have a problem regarding how to make a calculator using SWITCH CASE,
i've tried to make a program of that using other functions and it made it successfully but when i used SWITCH CASE i've got two errors and i cat find where the errors is? i just wanna ask an examle of it?,,,...

You seem to have mentioned that you have attepted to make some sort of effort at seeking a solution to the problem. I'm sure myself and others would be highly interested in seeing what you have come up with thus far; thereby seperating yourself from the masses of "please do this for me" laziness that we are so often subjected to on a daily basis.

owk i'll try thans!!! :)

here is my previews program using if_else_if:

float ans;
int nim1=4,num2=2;
char op;
printf(input expression:");
scanf("%c",& op);
if (operator=='+');
ans=num1+num2;
printf("ans");
else if(operator=='-');
ans=num1-num2;
printf("ans");
else if (op=='*');
else if(op=='/');
else 
printf(invalid operator);
return 0
}

keyzzz_it, please provide the complete program, along with the header files.
It seem that you have provided a very sketchy program. Give the complete program within code tags. It's beneficial both ways

Also, why are you posting C code in a C++ forum..??!

Also, why are you posting C code in a C++ forum..??!

As far as i know, all C code can be compiled as C++ code. But as per forum instructions, it should be moved.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.